Skip to content

Commit

Permalink
[FIX] modify log path
Browse files Browse the repository at this point in the history
  • Loading branch information
eunsol-an committed Nov 11, 2024
1 parent 2267227 commit 97d1e06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<property name="CONSOLE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %clr(%5level) %cyan(%logger) - %msg%n" />
<property name="FILE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %5level %logger - %msg%n" />
<property name="LOG_NAME_PATTERN" value="./logs/application-%d{yyyy-MM-dd}.%i.log" />
<property name="LOG_PATH" value="./logs"/>
<property name="MAX_HISTORY" value="30" />
<property name="MAX_FILE_SIZE" value="10MB" />
<property name="TOTAL_SIZE" value="30MB" />
Expand All @@ -23,7 +23,7 @@
<pattern>${FILE_LOG_PATTERN}</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_NAME_PATTERN}</fileNamePattern>
<fileNamePattern>${LOG_PATH}/application-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxHistory>${MAX_HISTORY}</maxHistory>
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
<totalSizeCap>${TOTAL_SIZE}</totalSizeCap>
Expand All @@ -49,13 +49,15 @@
</springProfile>

<springProfile name="dev">
<property name="LOG_PATH" value="/home/ubuntu/app/logs"/>
<root level="DEBUG">
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
</springProfile>

<springProfile name="prod">
<property name="LOG_PATH" value="/home/ubuntu/app/logs"/>
<logger name="com.nextroom.nextRoomServer.dto" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="CONSOLE" />
Expand Down

0 comments on commit 97d1e06

Please sign in to comment.