std.experimental.logger default log level is everything

singingbush singingbush at hotmail.com
Fri May 28 21:50:19 UTC 2021


On Friday, 28 May 2021 at 17:29:48 UTC, Steven Schveighoffer 
wrote:
> IMO, the default level should be either `off` (no logging) or 
> `fatal`. I shouldn't see trace messages without opting in to 
> logging.

I agree, defaulting to LogLevel.all was a bad choice. I also 
think that std.experimental.logger shouldn't setup a logger by 
default. It's very easy for a user to opt in using `sharedLog = 
new MyLogger();` I'm happy for phobos to include a Logger 
implementation but the default behaviour should be to not output 
anything unless a Logger has been explicitly assigned to 
sharedLog.




More information about the Digitalmars-d mailing list