vibe.d HTMLLogger

Chris via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Oct 12 04:54:14 PDT 2016


Why does FileLogger work while HTMLLogger crashes on the same 
thing? I've had a look at the source code, but couldn't find 
anything. It happens with vibe.d `0.7.30-beta1` and `0.7.29` 
alike (haven't tested lower versions).

[Test code]
auto logLine = LogLine();
logLine.level = LogLevel.info;

// Fine
auto l = new FileLogger("log/logger_test.log");
l.minLevel = LogLevel.info;
l.beginLine(logLine);
l.put("Hello!");
l.endLine();

htmlLogger = new HTMLLogger("log/logger_test.html");
htmlLogger.minLevel = LogLevel.info;
// crashes here (at `beginLine`), if removed it works.
htmlLogger.beginLine(logLine);
htmlLogger.put("Hello!");
htmlLogger.endLine();


More information about the Digitalmars-d-learn mailing list