Voting: std.logger

via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 1 11:57:23 PDT 2014


On Monday, 1 September 2014 at 16:52:16 UTC, Dicebot wrote:
> You are totally misunderstanding goals of std.logger - people 
> as _expected_ to roll their own Loggers. std.logger is here 
> only to provide standard API for those to integrate with each 
> other and few trivial common implementation as examples. Rest 
> is dub business.

Oh, I understand the intentions perfectly well, but the default 
should be performant, multithreaded, and cover the most common 
use scenario.

Without a performant reference implementation that can be used 
for performance testing it isn't  convincing. You also need to 
account for issues such as multi-threading, throttling etc. 
Meaning, you might need to have queues and a merger-thread, defer 
formatting etc etc.

> And no, magic identification of format string is neither 
> language KISS nor interface KISS.

Formatting should be typesafe and preferably configurable with 
custom formatters, so it should resolve at compile-time one way 
or the other.

You don't want an exceptional path to have a runtime error 
triggered by a log() statement, i.e. you don't want the 
possibility that turning on logging can introduce bugs. That 
should be the most important requirement.


More information about the Digitalmars-d mailing list