Comparison

teal-src/util/logger.d.tl @ 12621:041d067de38b

util.logger: Add Teal interface description
author Kim Alvefur <zash@zash.se>
date Sun, 24 Jul 2022 21:39:07 +0200
comparison
equal deleted inserted replaced
12620:09d86413c3c5 12621:041d067de38b
1 local record util
2 enum loglevel
3 "debug"
4 "info"
5 "warn"
6 "error"
7 end
8 type logger = function ( loglevel, string, ...:any )
9 type sink = function ( string, loglevel, string, ...:any )
10 type simple_sink = function ( string, loglevel, string )
11 init : function ( string ) : logger
12 make_logger : function ( string, loglevel ) : function ( string, ...:any )
13 reset : function ()
14 add_level_sink : function ( loglevel, sink )
15 add_simple_sink : function ( simple_sink, { loglevel } )
16 end
17
18 return util