Voting: std.logger

Jeremy Powers via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 4 16:14:45 PDT 2014


>
> As I understand, it's a defensive feature. There are things one wants in
>> the log unconditionally, like OS version and program version. They can be
>> logged at fatal level, but that's a workaround and looks confusing, and
>> still can be filtered.
>>
>
> Believe that's what the 'off' level is for, though it is confusingly named
> (off as in no filtering, not no logging).  Maybe better called 'always'?
>

Looking at the current version of the logger code, there is nothing that
will always be logged - if the logging level (global or logger) is set to
'off' it will not log even if you call log() without a level.  So a bit of
clarifying around this may be desired.



>
> I contend that having bare log methods without a specified level is a
> mis-feature.  They may be useful as a shortcut when the desired level is
> unknown/irrelevant, but I don't believe what they add is worth the bother.
>

Leaving this quote in, since it's my main point - I think not having a bare
log() method is better than having one.  Log levels are pretty basic to the
idea of logging (as done here and most everywhere else), trying to ignore
them just moves the complexity elsewhere.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140804/a87fc019/attachment.html>


More information about the Digitalmars-d mailing list