std.experimental.logger
Robert burner Schadek via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jan 5 01:18:21 PST 2016
On Tuesday, 5 January 2016 at 02:44:48 UTC, sanjayss wrote:
> I'm doing the following:
>
> import std.experimental.logger;
>
> int
> main(string[] args)
> {
> sharedLog = new FileLogger("logfile.log");
>
> log("Test log 1");
> log("Test log 2");
> log("Test log 3");
> }
diff:
sharedLog = new FileLogger("logfile.log", LogLevel.all);
calling log uses the globalLogLevel, which is LogLevel.all by
default.
The default LogLevel of a new FileLogger is LogLevel.info.
So the new FileLogger drops the log messages.
This is an inconsistency I will fix.
More information about the Digitalmars-d-learn
mailing list