github actions support

This commit is contained in:
Amit Kumar Nandi 2024-02-17 20:06:25 +05:30
parent aa8f4fcd8d
commit 80696ef138

View file

@ -1,22 +1,40 @@
<!-- logback-spring.xml --> <!-- logback-spring.xml -->
<configuration> <configuration>
<!-- File Appender -->
<appender name="file" class="ch.qos.logback.core.FileAppender">
<file>logs/shortener.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!-- Appender for console output --> <!-- Define the base path for log files -->
<property name="LOG_PATH" value="logs" />
<!-- Console Appender -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder> </encoder>
</appender> </appender>
<!-- Root logger --> <!-- Rolling File Appender -->
<root level="debug"> <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<appender-ref ref="file"/> <file>${LOG_PATH}/shortener.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_ARCHIVE}/shortener.log.%d{yyyy-MM-dd}.log</fileNamePattern>
<maxHistory>30</maxHistory>
<maxFileSize>10MB</maxFileSize>
<totalSizeCap>1GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
</appender>
<!-- Async Appender (Wrap appenders in Async to make logging asynchronous) -->
<appender name="async" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="rollingFile" />
<appender-ref ref="console" />
</appender>
<!-- Root Logger -->
<root level="info">
<appender-ref ref="async" />
</root> </root>
</configuration>
</configuration>