Review: std.logger

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 24 12:00:44 PDT 2014


On Thursday, 24 July 2014 at 18:51:03 UTC, Andrei Alexandrescu 
wrote:
> 3. I'm not sure I like the design using defaultLogger in 
> conjunction with free functions using it. It clearly makes for 
> comfortable casual logging by just calling log(whatevs) and it 
> uses a precedent set by stdout. But I wonder if it would be 
> cleaner to just give it a shorter name "log" and then have it 
> have a "write" method:
>
> log("crap");
> -> becomes ->
> log.write("crap");
>
> Also there'd be log.writef("%s", "crap") etc.

It is amusing to see that you don't like D module system too :)

(and no, "write" it is not cleaner at all being different from 
pretty much any logging system out there)


More information about the Digitalmars-d mailing list