Software /
code /
prosody
Annotate
teal-src/util/logger.d.tl @ 12849:330bfcaa5532
luacheck: Remove long gone mod_storage_sql1 from excludes
No point not checking a file that doesn't exist
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 19 Jan 2023 17:29:40 +0100 |
parent | 12621:041d067de38b |
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 |