From 93f338a5e77bd9494f4c9b6c7a4de41265c3bb26 Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Fri, 19 May 2023 22:35:23 +0200 Subject: [PATCH] fix logger warnings, for real this time We should probably add a linter case for this --- src/dscanner/analysis/run.d | 4 ++-- src/dscanner/main.d | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dscanner/analysis/run.d b/src/dscanner/analysis/run.d index ae64328..6d15f13 100644 --- a/src/dscanner/analysis/run.d +++ b/src/dscanner/analysis/run.d @@ -621,10 +621,10 @@ version (unittest) shared static this() { // mute dsymbol warnings in tests - static if (__VERSION__ >= 2_101_0) + static if (__VERSION__ >= 2_101) { import std.logger : sharedLog, LogLevel; - sharedLog.globalLogLevel = LogLevel.error; + (cast()sharedLog).logLevel = LogLevel.error; } else { diff --git a/src/dscanner/main.d b/src/dscanner/main.d index 1710598..d8c98a1 100644 --- a/src/dscanner/main.d +++ b/src/dscanner/main.d @@ -118,7 +118,7 @@ else } { - static if (__VERSION__ >= 2_101_0) + static if (__VERSION__ >= 2_101) import std.logger : sharedLog, LogLevel; else import std.experimental.logger : globalLogLevel, LogLevel; @@ -126,8 +126,8 @@ else // messages that aren't errors from it by default // users can use verbose to enable all logs (this will log things like // dsymbol couldn't find some modules due to wrong import paths) - static if (__VERSION__ >= 2_101_0) - sharedLog.globalLogLevel = verbose ? LogLevel.all : LogLevel.error; + static if (__VERSION__ >= 2_101) + (cast()sharedLog).logLevel = verbose ? LogLevel.all : LogLevel.error; else globalLogLevel = verbose ? LogLevel.all : LogLevel.error; }