Skip to content

Commit

Permalink
std.logger change on recent compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
SingingBush committed Jun 20, 2023
1 parent 99fce8d commit 550dfc5
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions source/config/logging/colorstdlogger.d
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,14 @@ class StdColourfulMoonLogger : Logger {
writeln();
}

static if (__traits(compiles, (){ import std.logger; } )) {
// cannot override writeLogMsg
} else static if(__traits(compiles, (){ import std.experimental.logger; } )) {
override protected void writeLogMsg(ref LogEntry payload) {
this.beginLogMsg(payload.file, payload.line, payload.funcName,
payload.prettyFuncName, payload.moduleName, payload.logLevel,
payload.threadId, payload.timestamp, payload.logger);

this.logMsgPart(payload.msg);

this.finishLogMsg();
}
override void writeLogMsg(ref LogEntry payload) @safe {
this.beginLogMsg(payload.file, payload.line, payload.funcName,
payload.prettyFuncName, payload.moduleName, payload.logLevel,
payload.threadId, payload.timestamp, payload.logger);

this.logMsgPart(payload.msg);

this.finishLogMsg();
}

}

0 comments on commit 550dfc5

Please sign in to comment.