Am 26.02.2015 um 22:42 schrieb CanadianNomad:
I wanted to create a custom console logger to extend the functionality provided. I found that I couldn't deregister the standard logger because I couldn't get a reference to the logger instances.
I ended up having to edit the core files...source/vibe/core/log.d
private shared(Logger)[] getLoggers() nothrow @trusted { return ss_loggers; }
became:
shared(Logger)[] getLoggers() nothrow @trusted { return ss_loggers; }
source/app.d
auto loggers = getLoggers(); foreach(i; loggers) { deregisterLogger(i); }
Seems to me that the getLoggers function shouldn't be private, or there should be a way to deregister all loggers.
You can disable the default logger using setLogLevel(LogLevel.none);
.
But I think it might me interesting to actually integrate the color
support into the default FileLogger
.