On Saturday, 12 July 2014 at 12:19:03 UTC, Johannes Pfau wrote:
Am Fri, 11 Jul 2014 14:36:30 +0000
schrieb "Dicebot" <pub...@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 ;-)
I know, I will make it less scary.
* The docs do not mention thread safety at all. Can I change the
default logger while other threads are logging?
That is already on my todo list.
* The docs should clearly mention the default logger (this is
kinda
mentioned, but I'd make it more explicit) and the default
loglevel.
ok
* Can the logger be influenced by command line flags /
environment
variables? I guess not, but if it can it should be documented.
I thought not writing about it makes it clear that you can not.
* 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)
Will do
* Why does LogManager.defaultLogger return by ref instead of
just using
a setter?
Because I use the defaultLogger at quite a lot of places and
treating it as an property just felt right.
* 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)
Will do
logger.multilogger:
* Should mention thread safety. If other threads log to the
multilogger
I know, threads
can I simply add/remove loggers?
yes: new WhatEverLoggerYouWant("some_good_name", LogLevel.xxxx);