[Issue 15536] [std.experimental.logger] More detailed example for custom logger implementation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 26 19:25:01 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=15536
--- Comment #3 from Arun Chandrasekaran <aruncxy at gmail.com> ---
I'm not against custom logger implementation, however, I think this can be
achieved with a function that accepts a log pattern, globally and per logger.
Something like this:
%t = thread-id
%T = timestamp
%l = log level
%m = log message
logger.setPattern("%t %T %l %m") would result in log message as follows.
2019-04-26 10:51:22.876 083892 info Some stuff.
This will make it very flexible.
--
More information about the Digitalmars-d-bugs
mailing list