Page History
...
logback은 다양한 방법의 로그방식을 추가할수 있는 유용한 로그 라이브러리 입니다.
Code Block | ||||
---|---|---|---|---|
| ||||
#application.propertis logging.config=classpath:logback-spring.xml #application.conf akka { loggers = ["akka.event.Logging$DefaultLogger"] loglevel = "INFO" stdout-loglevel = "ERROR" } #logback-spring.xml <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%date{ISO8601} %-5level %X{akkaSource} - %msg%n</pattern> </encoder> </appender> <root level="INFO"> <appender-ref ref="STDOUT" /> </root> </configuration> |
Step2.1 - 로그변경(Slf4jLogger)
Code Block | ||||
---|---|---|---|---|
| ||||
# application.conf akka { loggers = ["akka.event.slf4j.Slf4jLogger"] loglevel = "DEBUG" log-config-on-start = on } # pom.xml <dependency> <groupId>com.typesafe.akka</groupId> <artifactId>akka-slf4j_2.12</artifactId> <version>${akka.version}</version> </dependency> # logback-spring.xml <logger name="org.springframework.data" level="error" /> <logger name="akka" level="error" /> |
...