Voting: std.logger

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 28 10:38:38 PDT 2014


On Wednesday, 27 August 2014 at 06:14:10 UTC, Marco Leise wrote:
>> I really think this is the case where you should roll your own 
>> FileNoThrowingLogger and go with it.
>
> *Me* or everyone who needs to log something in a dtor?

I really believe that necessity to log something in dtor is 
currently an indicator of design issues in the application. D 
class destructors are unreliable to the point of being almost 
useless, I'd be very careful about actually caring if those run 
at all.

>> In a long term this is something much better to be fixed in GC 
>> implementation than constantly hacked in stdlib modules.
>
> Or is this maybe the other language change (besides not
> generating code for unused lambdas) that should be pushed
> with std.log, because otherwise it will never be solved ?
>
> I don't know, but no logging in dtors is a serious
> and hard to sell limitation. Not the author's fault though.

I agree that current situation is bad but I disagree that std.log 
is a proper place to solve it. It is a part of much bigger issue 
and adding few local workarounds does not make situation much 
better.


More information about the Digitalmars-d mailing list