util.logger: Add Teal interface description

This commit is contained in:
Kim Alvefur 2022-07-24 21:39:07 +02:00
parent 6e1de3134c
commit 90dd7f6943

18
teal-src/util/logger.d.tl Normal file
View file

@ -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