Review: std.logger

Kapps via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 11 08:08:23 PDT 2014


The API seems nice and simple while providing enough flexibility,
and I think it would work quite well for my purposes. Some
comments:

API:
Not clear what the difference between globalLogLevel and a log
level on each individual logger is. Does the global one only
affect the global logger? What happens if you change the
globalLogLevel and the logLevel on the logger set as the global
one?

Documentation:
Logger Constructor: "The fatal handler will throw, and Error if a
log call is made with a LogLevel LogLevel.fatal." - Should be
"will throw an error if".
LogManager class: "It also handels the defaultLogger which is
used" - Should be handles.
LogManager class: "also allows to retrieve Logger by there name"
- Should be their.
LogManager class: "The static LogManager handles the creation,
and the release" - The comma shouldn't be there.
defaultLogger: "that means it can be assigend" - assigned
defaultLogger: "The Logger is returned as a reference that means
it can be assigend, thus changing the defaultLogger." - Wording
is a bit odd right now, perhaps something like "The Logger is
returned as a reference, meaning it can be assigned to change the
defaultLogger.".


More information about the Digitalmars-d mailing list