Skip to content

Commit

Permalink
Reviewing and improving logger config.
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-brandizi committed Aug 22, 2024
1 parent 1d0d15f commit bac61cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<appender name="ConsoleApp" class="ch.qos.logback.core.ConsoleAppender">
<target>System.err</target>
<encoder>
<pattern>%date{HH:mm:ss.SSS} [%-5level]: %message%n</pattern>
<pattern>%date{HH:mm:ss.SSS} %-5level [%-6thread] %logger{1.3} %message%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
Expand All @@ -23,8 +23,8 @@
<maxHistory>90</maxHistory>
</rollingPolicy>
<encoder>
<!-- TODO: %class and %line are useful, but possibly slow, is it worth to ship with these? -->
<pattern>%date{dd MMM yyyy HH:mm:ss.SSS} [%-6thread] [%-5level] \(%class{1},%line\): %message%n</pattern>
<!-- TODO: %%line are useful, but possibly slow, is it worth to ship with these? -->
<pattern>%date{dd MMM yyyy HH:mm:ss.SSS} %-5level [%-6thread] %logger{1.3}:%line %message%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ALL</level>
Expand Down
4 changes: 2 additions & 2 deletions rdf2pg-core/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<appender name="ConsoleApp" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%-6t] [%-5p]: %m%n</pattern>
<pattern>%date{HH:mm:ss.SSS} %-5level [%-6thread] %logger{1}:%line %message%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ALL</level>
Expand All @@ -20,7 +20,7 @@
<File>target/test.log</File>

<encoder>
<pattern>%d{dd MMM yyyy HH:mm:ss.SSS} [%-5p] \(%C{1},%L\): %m%n</pattern>
<pattern>%date{dd MMM yyyy HH:mm:ss.SSS} %-5level [%-6thread] %logger{1}:%line %message%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ALL</level>
Expand Down

0 comments on commit bac61cf

Please sign in to comment.