I was interested low(er) cost logging and stumbled across a
proposal by Max Klimov from about 16 months ago to add an
AsyncLogger to std.experimental.logger (ref
http://forum.dlang.org/thread/[email protected]). The resulting PR 3194 has been dormant for some time. I was going to resuscitate it, but I wanted to change the approach - rather than make AsyncLogger a generic wrapper for another logger type, I wanted to make a specialist logger that was designed to always be the stdThreadLocalLogger. It would be a stub that merely sends a LogEntry (as a message) to the stdSharedLogger (which would be any logger type).
When taking a closer look at std.experimental.logger I realized
that with the current design, becauseThreadLocalLog is just
another Logger, it is paying all the cost of sychronization,
even though it is thread local.
Am I interpreting the purpose of stdThreadLocalLogger differently
to how it was intended?
- std.experimental.logger threading ... kookman via Digitalmars-d
-