mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 18:16:45 +00:00
set log level dynamically
This commit is contained in:
parent
faa8f71313
commit
b84aa2e7cb
2 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,7 @@ package com.sparrowwallet.drongo;
|
||||||
import com.sparrowwallet.drongo.rpc.BitcoinJSONRPCClient;
|
import com.sparrowwallet.drongo.rpc.BitcoinJSONRPCClient;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.slf4j.event.Level;
|
||||||
import org.zeromq.SocketType;
|
import org.zeromq.SocketType;
|
||||||
import org.zeromq.ZContext;
|
import org.zeromq.ZContext;
|
||||||
import org.zeromq.ZMQ;
|
import org.zeromq.ZMQ;
|
||||||
|
@ -74,4 +75,9 @@ public class Drongo {
|
||||||
public List<WatchWallet> getWallets() {
|
public List<WatchWallet> getWallets() {
|
||||||
return watchWallets;
|
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()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ open module com.sparrowwallet.drongo {
|
||||||
requires de.mkammerer.argon2;
|
requires de.mkammerer.argon2;
|
||||||
requires slf4j.api;
|
requires slf4j.api;
|
||||||
requires logback.core;
|
requires logback.core;
|
||||||
|
requires logback.classic;
|
||||||
requires json.simple;
|
requires json.simple;
|
||||||
requires jeromq;
|
requires jeromq;
|
||||||
exports com.sparrowwallet.drongo;
|
exports com.sparrowwallet.drongo;
|
||||||
|
|
Loading…
Reference in a new issue