-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feat/#67 LogBack 설정
- Loading branch information
Showing
4 changed files
with
74 additions
and
7 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ out/ | |
### VS Code ### | ||
.vscode/ | ||
|
||
firebase_service_key.json | ||
firebase_service_key.json |
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
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,69 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<configuration> | ||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/> | ||
|
||
<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"/> | ||
|
||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>${CONSOLE_LOG_PATTERN}</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="API-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<encoder> | ||
<pattern>${FILE_LOG_PATTERN}</pattern> | ||
</encoder> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<fileNamePattern>/home/ubuntu/api-server/logs/%d{yyyy-MM-dd}.%i.log</fileNamePattern> | ||
<maxFileSize>100MB</maxFileSize> | ||
<maxHistory>30</maxHistory> | ||
</rollingPolicy> | ||
</appender> | ||
|
||
<appender name="NOTIFICATION-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<encoder> | ||
<pattern>${FILE_LOG_PATTERN}</pattern> | ||
</encoder> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<fileNamePattern>/home/ubuntu/notification-server/logs/%d{yyyy-MM-dd}.%i.log</fileNamePattern> | ||
<maxFileSize>100MB</maxFileSize> | ||
<maxHistory>30</maxHistory> | ||
</rollingPolicy> | ||
</appender> | ||
|
||
|
||
<springProfile name="local"> | ||
<root level="INFO"> | ||
<appender-ref ref="CONSOLE" /> | ||
</root> | ||
<logger name="com.chiwawa.lionheart" level="TRACE" /> | ||
</springProfile> | ||
|
||
<springProfile name="dev"> | ||
<root level="INFO"> | ||
<appender-ref ref="CONSOLE" /> | ||
</root> | ||
<logger name="com.chiwawa.lionheart.api" level="INFO"> | ||
<appender-ref ref="API-FILE"/> | ||
</logger> | ||
<logger name="com.chiwawa.lionheart.notification" level="INFO"> | ||
<appender-ref ref="NOTIFICATION-FILE"/> | ||
</logger> | ||
</springProfile> | ||
|
||
<springProfile name="prod"> | ||
<root level="INFO"> | ||
<appender-ref ref="CONSOLE" /> | ||
</root> | ||
<logger name="com.chiwawa.lionheart.api" level="INFO"> | ||
<appender-ref ref="API-FILE"/> | ||
</logger> | ||
<logger name="com.chiwawa.lionheart.notification" level="INFO"> | ||
<appender-ref ref="NOTIFICATION-FILE"/> | ||
</logger> | ||
</springProfile> | ||
|
||
</configuration> |