diff --git a/src/main/java/com/sparrowwallet/drongo/Drongo.java b/src/main/java/com/sparrowwallet/drongo/Drongo.java index 5f60c70..6d77694 100644 --- a/src/main/java/com/sparrowwallet/drongo/Drongo.java +++ b/src/main/java/com/sparrowwallet/drongo/Drongo.java @@ -3,6 +3,7 @@ package com.sparrowwallet.drongo; import com.sparrowwallet.drongo.rpc.BitcoinJSONRPCClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.event.Level; import org.zeromq.SocketType; import org.zeromq.ZContext; import org.zeromq.ZMQ; @@ -74,4 +75,9 @@ public class Drongo { public List getWallets() { return watchWallets; } + + public static void setRootLogLevel(Level level) { + ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger)LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME); + root.setLevel(ch.qos.logback.classic.Level.toLevel(level.toString())); + } } diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index fbd2c9f..af29d6a 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -3,6 +3,7 @@ open module com.sparrowwallet.drongo { requires de.mkammerer.argon2; requires slf4j.api; requires logback.core; + requires logback.classic; requires json.simple; requires jeromq; exports com.sparrowwallet.drongo;