Change log level

This commit is contained in:
Andrea Cavalli 2022-10-17 12:31:35 +02:00
parent de74bae7ca
commit 25bd647053
4 changed files with 5 additions and 3 deletions

View File

@ -26,7 +26,7 @@
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-java-bom</artifactId>
<version>2.8.5.7</version>
<version>2.8.5.8</version>
<type>pom</type>
<scope>import</scope>
</dependency>

View File

@ -6,6 +6,7 @@ import it.tdlight.client.CommandHandler;
import it.tdlight.client.SimpleTelegramClient;
import it.tdlight.client.TDLibSettings;
import it.tdlight.common.Init;
import it.tdlight.common.Log;
import it.tdlight.common.utils.CantLoadLibrary;
import it.tdlight.jni.TdApi;
import java.nio.file.Paths;

View File

@ -13,6 +13,7 @@
</Appenders>
<Loggers>
<Logger name="it.tdlight.TDLight" level="ERROR" additivity="false" />
<Root level="INFO">
<AppenderRef ref="Console"/>
</Root>

View File

@ -50,8 +50,8 @@ public final class Init {
LoadLibrary.load("tdjni");
ConstructorDetector.init();
try {
NativeClientAccess.execute(new SetLogVerbosityLevel(2));
Log.setLogMessageHandler(2, (verbosityLevel, message) -> {
NativeClientAccess.execute(new SetLogVerbosityLevel(3));
Log.setLogMessageHandler(3, (verbosityLevel, message) -> {
switch (verbosityLevel) {
case -1:
case 0: