Skip to content

Commit

Permalink
refactor: log 중복돼서 출력되는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yooooonshine committed Dec 4, 2024
1 parent 84d97ef commit bf6a057
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions backend/src/main/resources/logback/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,29 @@
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"/>

<include resource="logback/console-appender.xml"/>
<include resource="logback/file-info-appender.xml"/>

<!--프로필별로 로그 설정-->
<!--local: 콘솔에 출력-->
<springProfile name="local">

<include resource="logback/console-appender.xml"/>
<include resource="logback/file-info-appender.xml"/>

<root level="INFO">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE-INFO"/>
</root>

<logger level="INFO" name="aimo.backend"/>

<logger level="DEBUG" name="org.hibernate.SQL">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE-INFO"/>
</logger>

<logger level="TRACE" name="org.hibernate.type.descriptor.sql.BasicBinder">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE-INFO"/>
</logger>
<logger level="DEBUG" name="org.hibernate.SQL"/>
</springProfile>

<!--dev:콘솔, 파일 둘다 출력-->
<springProfile name="dev">

<include resource="logback/console-appender.xml"/>
<include resource="logback/file-info-appender.xml"/>

<root level="INFO">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE-INFO"/>
</root>

<logger level="INFO" name="aimo.backend"/>

<logger level="DEBUG" name="org.hibernate.SQL">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE-INFO"/>
</logger>

<logger level="TRACE" name="org.hibernate.type.descriptor.sql.BasicBinder">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE-INFO"/>
</logger>
<logger level="DEBUG" name="org.hibernate.SQL"/>
</springProfile>

</configuration>
Expand Down

0 comments on commit bf6a057

Please sign in to comment.