diff --git a/drongo b/drongo index c084a0de..5b2e21b3 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit c084a0de7e92bbc500234e66dcec690475ac9121 +Subproject commit 5b2e21b3d7cc5d6dff730baeec5efbb419f3555c diff --git a/src/main/java/com/sparrowwallet/sparrow/TorLogHandler.java b/src/main/java/com/sparrowwallet/sparrow/TorLogHandler.java new file mode 100644 index 00000000..aa6e6e2f --- /dev/null +++ b/src/main/java/com/sparrowwallet/sparrow/TorLogHandler.java @@ -0,0 +1,12 @@ +package com.sparrowwallet.sparrow; + +import com.sparrowwallet.drongo.LogHandler; +import com.sparrowwallet.sparrow.event.TorStatusEvent; +import org.slf4j.event.Level; + +public class TorLogHandler implements LogHandler { + @Override + public void handleLog(String threadName, Level level, String message, String loggerName, long timestamp, StackTraceElement[] callerData) { + EventManager.get().post(new TorStatusEvent(message)); + } +} diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 5abd8741..ff2c20d1 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -22,6 +22,14 @@ + + com.sparrowwallet.sparrow.TorLogHandler + + + + + +