aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-07-24 21:39:07 +0200
committerKim Alvefur <zash@zash.se>2022-07-24 21:39:07 +0200
commit90dd7f694318b638ff1eef4d9a6e2e6f7f69820f (patch)
tree51b7993f125ab592bc5a7f7542ccac7610444d4e /teal-src
parent6e1de3134c037a4308531c031f9eae401091ed76 (diff)
downloadprosody-90dd7f694318b638ff1eef4d9a6e2e6f7f69820f.tar.gz
prosody-90dd7f694318b638ff1eef4d9a6e2e6f7f69820f.zip
util.logger: Add Teal interface description
Diffstat (limited to 'teal-src')
-rw-r--r--teal-src/util/logger.d.tl18
1 files changed, 18 insertions, 0 deletions
diff --git a/teal-src/util/logger.d.tl b/teal-src/util/logger.d.tl
new file mode 100644
index 00000000..db29adfd
--- /dev/null
+++ b/teal-src/util/logger.d.tl
@@ -0,0 +1,18 @@
+local record util
+ enum loglevel
+ "debug"
+ "info"
+ "warn"
+ "error"
+ end
+ type logger = function ( loglevel, string, ...:any )
+ type sink = function ( string, loglevel, string, ...:any )
+ type simple_sink = function ( string, loglevel, string )
+ init : function ( string ) : logger
+ make_logger : function ( string, loglevel ) : function ( string, ...:any )
+ reset : function ()
+ add_level_sink : function ( loglevel, sink )
+ add_simple_sink : function ( simple_sink, { loglevel } )
+end
+
+return util