4 private import dlt.time
5 private import std.date
6 private import std.stdarg
8 enum Level: Trace, Info, Warn, Error
11 void log(int level, string src, string msg, TypeInfo[] arguments, va_list args)
13 class StreamAppender implements Appender:
17 void log(int level, string src, string msg, TypeInfo[] arguments, va_list args):
18 string lstr = ("Error" if level >= 3 else
19 "Warn" if level >= 2 else
20 "Info" if level >= 1 else
23 printer.format("{} {,-5} {} - ", clock, lstr, src)
24 printer.vformat(arguments, args, msg)
28 Level level = Level.Warn
31 void log(int level, string src, string msg, TypeInfo[] arguments, va_list args):
32 if level >= this.level:
34 a.log(level, src, msg, arguments, args)