OT: std.logger was Re: std.experimental Timeline
Robert burner Schadek via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jan 4 01:24:44 PST 2016
On Sunday, 3 January 2016 at 21:37:28 UTC, Dicebot wrote:
> Haven't found any issues with std.allocator so far but
> std.logger definitely is not Phobos ready per my requirements.
> I have been recently re-evaluating it as possible replacement
> for old Tango logger we use and found that in several places it
> forces unnecessary GC allocations and/or immutability (i.e.
> https://github.com/D-Programming-Language/phobos/blob/master/std/experimental/logger/core.d#L742 requires that log message must be formatted into immutable string before it can be passed to another logger). This is a deal breaker that can possibly require major API change to fix.
>
I do not follow.
1. Tango passes a const(char)[] around [1]. What is the
difference?
2. Have you looked at the doc and the impl. of FileLogger? They
both show an easy how to implement a Logger without the GC. With
that it is also trivial to make a MultiLogger that does not
allocate. BTW, the default implementation is a direct result of
the "by default multi-threading safe" requirement brought up
multiple times during reviews.
[1]
https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/util/log/Log.d#L1297
More information about the Digitalmars-d
mailing list