no applicable action for [springProfile], current ElementPath is [[configuration][appender][appender][springProfile]] 해결하기
Updated:
문제
logback을 설정해주었는데, spring boot 실행시 많은 info 정보들이 발생했다.
15:39:43,984 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
15:39:43,985 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
15:39:43,985 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/godo/Documents/GitHub/basecamp-playmusical.api/target/classes/logback.xml]
15:39:44,044 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
15:39:44,044 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
15:39:44,049 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [console]
15:39:44,056 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
15:39:44,098 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
15:39:44,100 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [user-logger]
15:39:44,110 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@26:39 - no applicable action for [springProfile], current ElementPath is [[configuration][appender][appender][springProfile]]
15:39:44,110 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@29:40 - no applicable action for [springProfile], current ElementPath is [[configuration][appender][appender][springProfile]]
15:39:44,111 |-INFO in ch.qos.logback.classic.AsyncAppender[user-logger] - Attaching appender named [null] to AsyncAppender.
15:39:44,111 |-INFO in ch.qos.logback.classic.AsyncAppender[user-logger] - Setting discardingThreshold to 409
15:39:44,112 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [user-logger] to Logger[com.playmuscial.api]
15:39:44,113 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[com.playmuscial.api]
15:39:44,113 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
15:39:44,115 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@563f38c4 - Registering current configuration as safe fallback point
원인
logback은 spring과 함께 load를 하는데, 이때 spring profile이 유효하지 않는 것!
해결
파일이름을 바꿔주자.
# rename file
logback.xml => logback-spring.xml
info정보들 없이 잘 실행되는 것을 볼 수 있다.
Leave a comment