Skip to content

Commit

Permalink
Tidy logback files & add space back to log pattern
Browse files Browse the repository at this point in the history
Uniformise the log patterns somewhat, by making the 'Logger' classname
field width either 15 for the seednode & statsnode, or 40 for the other
applications (lengthened from 30 in a few cases).

Also clean up the logback XML files somewhat, in particular removing
references to the old Thali (thaliproject/Tor_Onion_Proxy_Library) Tor
library, which was replaced years ago with our own fork of NetLayer
(https://github.com/cd2357/netlayer).

Finally, add a missing space back to the log pattern for bisq-desktop,
to prevent DEBUG, ERROR or TRACE lines appearing as follows:

  ... [JavaFX Application Thread] ERRORb.c.s.CommonSetup: ...

(It isn't clear whether this recently introduced behaviour was really
intentional, though it did prevent two consecutive spaces appearing in
the majority INFO log lines.)
  • Loading branch information
stejbac committed May 1, 2024
1 parent c6a8d82 commit 92da795
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion apitest/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-->
<appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{30}: %msg %xEx%n)</pattern>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{40}: %msg %xEx%n)</pattern>
</encoder>
</appender>

Expand Down
2 changes: 1 addition & 1 deletion apitest/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-->
<appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{30}: %msg %xEx%n)</pattern>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{40}: %msg %xEx%n)</pattern>
</encoder>
</appender>

Expand Down
3 changes: 1 addition & 2 deletions cli/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration>
<appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{30}: %msg %xEx%n)</pattern>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{40}: %msg %xEx%n)</pattern>
</encoder>
</appender>

Expand All @@ -11,5 +11,4 @@
</root>

<logger name="io.grpc.netty" level="WARN"/>

</configuration>
3 changes: 1 addition & 2 deletions daemon/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration>
<appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{30}: %msg %xEx%n)</pattern>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{40}: %msg %xEx%n)</pattern>
</encoder>
</appender>

Expand All @@ -11,5 +11,4 @@
</root>

<logger name="io.grpc.netty" level="WARN"/>

</configuration>
7 changes: 4 additions & 3 deletions desktop/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
<configuration>
<appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level%logger{40}: %msg %xEx%n)</pattern>
<pattern>%highlight(%d{MMM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{40}: %msg %xEx%n)</pattern>
</encoder>
</appender>

<!-- <logger name="org.bitcoinj" level="WARN"/>-->
<logger name="org.berndpruenster.netlayer.tor.Tor" level="WARN"/>
<root level="TRACE">
<appender-ref ref="CONSOLE_APPENDER"/>
</root>

<!-- <logger name="org.bitcoinj" level="WARN"/>-->
<logger name="org.berndpruenster.netlayer.tor.Tor" level="WARN"/>
</configuration>
3 changes: 0 additions & 3 deletions seednode/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@
<root level="TRACE">
<appender-ref ref="CONSOLE_APPENDER"/>
</root>

<logger name="com.msopentech.thali.toronionproxy.OnionProxyManagerEventHandler" level="INFO"/>

</configuration>
3 changes: 0 additions & 3 deletions statsnode/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@
<root level="TRACE">
<appender-ref ref="CONSOLE_APPENDER"/>
</root>

<logger name="com.msopentech.thali.toronionproxy.OnionProxyManagerEventHandler" level="INFO"/>

</configuration>

0 comments on commit 92da795

Please sign in to comment.