From 5924486895a5878fb75f98e08dd4cf1ee26fb4cf Mon Sep 17 00:00:00 2001 From: InversionSpaces Date: Fri, 6 Oct 2023 11:14:11 +0000 Subject: [PATCH] Init empty logger --- .../src/main/scala/aqua/compiler/Library.scala | 2 +- .../logging/src/main/scala/aqua/logging/LogFormatter.scala | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler-native-lib/src/main/scala/aqua/compiler/Library.scala b/compiler-native-lib/src/main/scala/aqua/compiler/Library.scala index c60c13b8..9bf3e6f6 100644 --- a/compiler-native-lib/src/main/scala/aqua/compiler/Library.scala +++ b/compiler-native-lib/src/main/scala/aqua/compiler/Library.scala @@ -27,7 +27,7 @@ object Library { ): Int = { val code = CTypeConversion.toJavaString(codePointer) - LogFormatter.initLogger(Some(scribe.Level.Info)) + LogFormatter.initEmptyLogger() val result = APICompilation .compileString( diff --git a/utils/logging/src/main/scala/aqua/logging/LogFormatter.scala b/utils/logging/src/main/scala/aqua/logging/LogFormatter.scala index 62cacf1b..3845ab81 100644 --- a/utils/logging/src/main/scala/aqua/logging/LogFormatter.scala +++ b/utils/logging/src/main/scala/aqua/logging/LogFormatter.scala @@ -18,4 +18,10 @@ object LogFormatter { .withHandler(formatter = formatter, minimumLevel = level) .replace() } + + def initEmptyLogger(): Logger = + scribe.Logger.root + .clearHandlers() + .clearModifiers() + .replace() }