Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added warning & error logging and removed logging ServerController to… #53

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 8 additions & 22 deletions service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,18 @@
<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>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
<encoder>
<pattern>
%-30(%d %p) %-30.30([%t] %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">
<root level="DEBUG">
<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>
Loading