Skip to content

Commit

Permalink
feat: logback 설정을 추가한다. (#63)
Browse files Browse the repository at this point in the history
* feat: logback 설정을 추가한다.

* remove: test entity 및 미사용 import 제거
  • Loading branch information
rlarltj authored Feb 1, 2024
1 parent a5450e9 commit cee01d9
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 100 deletions.
32 changes: 0 additions & 32 deletions src/main/java/com/moneymong/domain/test/TestEntity.java

This file was deleted.

This file was deleted.

This file was deleted.

27 changes: 0 additions & 27 deletions src/main/java/com/moneymong/domain/test/service/TestService.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.moneymong.domain.user.entity;

import com.moneymong.global.domain.BaseEntity;
import com.moneymong.global.domain.TimeBaseEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/appender/moneymong-console-appender.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<included>
<appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
</encoder>
</appender>
</included>
23 changes: 23 additions & 0 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<configuration packagingData="true">
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
<property name="CONSOLE_LOG_PATTERN"
value="%clr(%d{yyyyMMdd HH:mm:ss.SSS}){magenta} %clr([%thread]){blue} %clr(%-5level){} %clr([%logger{0}:%line]){cyan} : %msg %n"/>

<property name="AWS_LOG_PATTERN"
value="[%thread] [%date] [%level] [%file:%line] - %msg%n"/>

<springProfile name="local">
<include resource="appender/moneymong-console-appender.xml"/>
<root level="INFO">
<appender-ref ref="CONSOLE_APPENDER"/>
</root>
</springProfile>

<springProfile name="dev">
<include resource="appender/moneymong-console-appender.xml"/>
<root level="INFO">
<appender-ref ref="CONSOLE_APPENDER"/>
</root>
</springProfile>

</configuration>

0 comments on commit cee01d9

Please sign in to comment.