-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from IV1201-Group-2/feature/logging
Added logging
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
|
||
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
<Pattern>%-30(%d %p) %-30.30([%t] %C): %msg%n%throwable</Pattern> | ||
</layout> | ||
</appender> | ||
|
||
<appender name="File" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>logs/app-logback.log</file> | ||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | ||
<Pattern>%d %p %C: %msg%n%throwable</Pattern> | ||
</encoder> | ||
|
||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<fileNamePattern>logs/archived/app-%d{yyyy-MM-dd}.%i-logback.log</fileNamePattern> | ||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | ||
<maxFileSize>10MB</maxFileSize> | ||
</timeBasedFileNamingAndTriggeringPolicy> | ||
</rollingPolicy> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="Console" /> | ||
</root> | ||
|
||
<logger name="com.iv1201.clientservice.ServerController" level="INFO" additivity="false"> | ||
<appender-ref ref="File" /> | ||
<appender-ref ref="Console" /> | ||
</logger> | ||
|
||
</configuration> |