std.experimental.logger

sanjayss via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 5 10:15:46 PST 2016


On Tuesday, 5 January 2016 at 09:18:21 UTC, Robert burner Schadek 
wrote:
> 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.

Thanks -- seems like you found my bugzilla issue and fixed the 
problem. I'll try using your diff above and see if that helps me.


More information about the Digitalmars-d-learn mailing list