std.experimental.logger default log level is everything
Steven Schveighoffer
schveiguy at gmail.com
Fri May 28 19:25:52 UTC 2021
On 5/28/21 3:09 PM, ikod wrote:
> In my libraries I usually call tracing/loging with debug's like:
> debug(mylibrary) tracef(...);
>
> so by default library user will not see any log messages from library
> code. User have to enable debug=mylibrary in dub config or in makefile,
> so he become aware of the consequences.
>
Sure, but you shouldn't have to do that. It's trivial to change the
default log level in phobos and then libraries have a choice on how to
support logging.
Plus, things like info logging might not be correct to put behind a
debug statement.
For example, vibe-d always has logging enabled, but the default is
reasonable.
-Steve
More information about the Digitalmars-d
mailing list