Software /
code /
prosody
Annotate
teal-src/util/logger.d.tl @ 12627:b8ce0f61855b
util.signal: Fix name conflict in Teal interface declaration
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 10 Aug 2022 15:12:00 +0200 |
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 |