Review: std.logger
Johannes Pfau via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jul 12 05:17:06 PDT 2014
Am Fri, 11 Jul 2014 14:36:30 +0000
schrieb "Dicebot" <public at dicebot.lv>:
> Round of a formal review before proceeding to voting. Subject for
> Phobos inclusion : http://wiki.dlang.org/Review/std.logger
> authored by Robert Schadek.
>
> Code:
> https://github.com/D-Programming-Language/phobos/pull/1500
> Documentation:
Overall design & API looks good.
Some detail comments and / or questions:
logger.core:
* For some people the EBNF might be useful, but it looks kinda scary to
me if I open the documentation ;-)
* The docs do not mention thread safety at all. Can I change the
default logger while other threads are logging?
* The docs should clearly mention the default logger (this is kinda
mentioned, but I'd make it more explicit) and the default loglevel.
* Can the logger be influenced by command line flags / environment
variables? I guess not, but if it can it should be documented.
* I think an example how to change the default logger should be at the
top of the module. (I think it's quite common people would want to
log to files as well)
* Why does LogManager.defaultLogger return by ref instead of just using
a setter?
* The logger.core documentation should have an overview of available
logger types and link to them. Probably a table with
Logger | module | Description
----------------------------------------------------
StdIOLogger | std.logger.stdiologger | log to standard output(console)
logger.multilogger:
* Should mention thread safety. If other threads log to the multilogger
can I simply add/remove loggers?
More information about the Digitalmars-d
mailing list