-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
decided to use logback with slf4j, seems stable and good. It works no…
…w with no warnings from terminal, whereas from IDE we keep (after uncountable hours) getting SLF4J: No SLF4J providers were found. Log is correctly written to file but also ends up in console, which has to be fixed
- Loading branch information
Showing
3 changed files
with
53 additions
and
36 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 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,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
# Console appender | ||
<!-- appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
# Pattern of log message for console appender | ||
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %-5p %m%n</Pattern> | ||
</layout> | ||
</appender--> | ||
|
||
# Rolling File appender | ||
<property name="LOG_FILE" value="ppkt2prompt" /> | ||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
# Pattern of log message for console appender | ||
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %-5p %m%n</Pattern> | ||
</layout> | ||
<file>${LOG_FILE}.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<!-- daily rollover --> | ||
<fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.gz</fileNamePattern> | ||
|
||
<!-- keep 30 days' worth of history capped at 1GB total size --> | ||
<maxHistory>30</maxHistory> | ||
<totalSizeCap>1GB</totalSizeCap> | ||
</rollingPolicy> | ||
<encoder> | ||
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
# Override log level for specified package | ||
<!-- logger name="" level="TRACE"/ --> | ||
|
||
<root level="INFO"> | ||
<!--appender-ref ref="STDOUT" /--> | ||
<appender-ref ref="FILE" /> | ||
</root> | ||
</configuration> | ||
|