Skip to content

Commit

Permalink
Allow customize log file name and location
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Sep 14, 2024
1 parent 836bfeb commit 9b68fa1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<configuration>

<variable name="APP_LOG_LEVEL" value="${APP_LOG_LEVEL:-INFO}" />
<variable name="LOG_FILE_NAME" value="${LOG_FILE_NAME:-lila-fishnet.log}"/>
<variable name="LOG_DIR" value="${LOG_DIR:-logs}"/>

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>logs/application.log</file>
<file>${LOG_DIR}/${LOG_FILE_NAME}</file>
<encoder>
<pattern>%date [%thread] %-5level %logger{20} - %msg%n%xException</pattern>
</encoder>
Expand Down

0 comments on commit 9b68fa1

Please sign in to comment.