std.experimental.logger formal review round 3

Robert burner Schadek via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 14 14:18:40 PST 2014


On Friday, 14 November 2014 at 21:49:09 UTC, David Nadlinger 
wrote:
> On Friday, 14 November 2014 at 21:46:00 UTC, Robert burner 
> Schadek wrote:
>> You can always roll your own non locking Logger, but the 
>> default should be thread-safe.
>
> You can't, since you need to inherit from Logger, which already 
> does the locking for you in a way that's not overridable. Also,

My bad, I mixed something up.

> I take it you are familiar with the fact that locks aren't the 
> only technique for achieving cross-thread synchronization.

Yes, but this way allows to add structured logging in an easy way.



More information about the Digitalmars-d mailing list