fix logger warnings, for real this time

We should probably add a linter case for this
This commit is contained in:
WebFreak001 2023-05-19 22:35:23 +02:00 committed by Jan Jurzitza
parent f37faf85dd
commit 93f338a5e7
2 changed files with 5 additions and 5 deletions

View file

@ -621,10 +621,10 @@ version (unittest)
shared static this() shared static this()
{ {
// mute dsymbol warnings in tests // mute dsymbol warnings in tests
static if (__VERSION__ >= 2_101_0) static if (__VERSION__ >= 2_101)
{ {
import std.logger : sharedLog, LogLevel; import std.logger : sharedLog, LogLevel;
sharedLog.globalLogLevel = LogLevel.error; (cast()sharedLog).logLevel = LogLevel.error;
} }
else else
{ {

View file

@ -118,7 +118,7 @@ else
} }
{ {
static if (__VERSION__ >= 2_101_0) static if (__VERSION__ >= 2_101)
import std.logger : sharedLog, LogLevel; import std.logger : sharedLog, LogLevel;
else else
import std.experimental.logger : globalLogLevel, LogLevel; import std.experimental.logger : globalLogLevel, LogLevel;
@ -126,8 +126,8 @@ else
// messages that aren't errors from it by default // messages that aren't errors from it by default
// users can use verbose to enable all logs (this will log things like // users can use verbose to enable all logs (this will log things like
// dsymbol couldn't find some modules due to wrong import paths) // dsymbol couldn't find some modules due to wrong import paths)
static if (__VERSION__ >= 2_101_0) static if (__VERSION__ >= 2_101)
sharedLog.globalLogLevel = verbose ? LogLevel.all : LogLevel.error; (cast()sharedLog).logLevel = verbose ? LogLevel.all : LogLevel.error;
else else
globalLogLevel = verbose ? LogLevel.all : LogLevel.error; globalLogLevel = verbose ? LogLevel.all : LogLevel.error;
} }