Annotate

teal-src/util/logger.d.tl @ 12646:3f38f4735c7a

usermanager, mod_auth_*: Add get_account_info() returning creation/update time This is useful for a number of things. For example, listing users that need to rotate their passwords after some event. It also provides a safer way for code to determine that a user password has changed without needing to set a handler for the password change event (which is a more fragile approach).
author Matthew Wild <mwild1@gmail.com>
date Tue, 12 Jul 2022 13:14:47 +0100
parent 12621:041d067de38b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12621
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 local record util
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2 enum loglevel
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 "debug"
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 "info"
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 "warn"
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 "error"
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 end
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 type logger = function ( loglevel, string, ...:any )
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 type sink = function ( string, loglevel, string, ...:any )
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 type simple_sink = function ( string, loglevel, string )
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 init : function ( string ) : logger
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 make_logger : function ( string, loglevel ) : function ( string, ...:any )
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 reset : function ()
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 add_level_sink : function ( loglevel, sink )
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 add_simple_sink : function ( simple_sink, { loglevel } )
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16 end
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17
041d067de38b util.logger: Add Teal interface description
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 return util