-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add another logging destination; switch logger (#1847)
- switch to logback - use only one logback.xml config file - introduce logging of ETL to a separate file - change log pattern to be more concise - exclude some logging libraries from dependencies - use adapter "log4j-to-slf4j" to log elasticsearch log4j2 logs - add mnising log messages
- Loading branch information
Showing
7 changed files
with
129 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,4 +233,4 @@ public Map<String, String> getMultilangLabel() { | |
return multilangLabel; | ||
} | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<configuration> | ||
<appender name="FILE_PLAY" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>./logs/play.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<!-- Daily rollover with compression --> | ||
<fileNamePattern>play-log-%d{yyyy-MM-dd}.%i.gz</fileNamePattern> | ||
<!-- keep 3 weeks worth of history --> | ||
<maxHistory>21</maxHistory> | ||
<!-- roll log file > 100MB --> | ||
<maxFileSize>100MB</maxFileSize> | ||
</rollingPolicy> | ||
<encoder> | ||
<pattern>%date{yyyy-MM-dd HH:mm:ss ZZZZ} [%level] from %logger{36} - %message%n%xException</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="FILE_ETL" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>./logs/etl.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<!-- Daily rollover with compression --> | ||
<fileNamePattern>etl-log-%d{yyyy-MM-dd}.%i.gz</fileNamePattern> | ||
<!-- keep 3 weeks worth of history --> | ||
<maxHistory>21</maxHistory> | ||
<!-- roll log file > 100MB --> | ||
<maxFileSize>100MB</maxFileSize> | ||
</rollingPolicy> | ||
<encoder> | ||
<pattern>%date{yyyy-MM-dd HH:mm:ss} [%level] %logger{52} in %thread - %message%n%xException</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%logger{15} - %message%n%xException{10}</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="ASYNCSTDOUT" class="ch.qos.logback.classic.AsyncAppender"> | ||
<appender-ref ref="STDOUT" /> | ||
</appender> | ||
|
||
<!-- Off these ones as they are annoying, and anyway we manage configuration ourself --> | ||
<logger name="com.avaje.ebean.config.PropertyMapLoader" level="OFF" /> | ||
<logger name="com.avaje.ebeaninternal.server.core.XmlConfigLoader" level="OFF" /> | ||
<logger name="com.avaje.ebeaninternal.server.lib.BackgroundThread" level="OFF" /> | ||
<logger name="com.gargoylesoftware.htmlunit.javascript" level="OFF" /> | ||
|
||
<logger name="play" level="INFO" > | ||
<appender-ref ref="FILE_PLAY" /> | ||
</logger> | ||
|
||
<logger name="application" level="INFO" > | ||
<appender-ref ref="FILE_ETL" /> | ||
</logger> | ||
<logger name="org.metafacture" level="INFO" > | ||
<appender-ref ref="FILE_ETL" /> | ||
</logger> | ||
<logger name="org.lobid" level="INFO" > | ||
<appender-ref ref="FILE_ETL" /> | ||
</logger> | ||
<logger name="de.hbz.lobid" level="INFO" > | ||
<appender-ref ref="FILE_ETL" /> | ||
</logger> | ||
<logger name="org.elasticsearch" level="INFO" > | ||
<appender-ref ref="FILE_ETL" /> | ||
</logger> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="ASYNCSTDOUT" /> | ||
</root> | ||
|
||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.