250x250
Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- Open Source
- JavaScript
- Thymeleaf
- 설정
- Tomcat
- STS
- error
- AJAX
- IntelliJ
- jpa
- ubuntu
- MSSQL
- Core Java
- SpringBoot
- spring
- JDBC
- Eclipse
- PostgreSQL
- maven
- myBatis
- Docker
- git
- oracle
- Exception
- 오픈소스
- Source
- 문서
- Python
- Spring Boot
- MySQL
Archives
- Today
- Total
헤르메스 LIFE
[LogBack] Could NOT find resource [logback-test.xml] 본문
728x90
Spring Boot로 개발을 시작하면서, Logback 을 Default Logger 로 사용하게 되는데..
logback.xml 만을 두면
아래와 같은 메시지가 보여집니다.
16:40:00,492 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
16:40:00,492 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/project/workspace/springboot/target/classes/logback.xml]
16:40:00,574 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
16:40:00,580 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/C:/project/workspace/springboot/target/classes/logback.xml]
16:40:00,580 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 30 seconds
별건 아닌데.. 이런거에 신경쓰이는 저이기 때문에..
해결 방법을 찾아봤습니다.
1. logback-test.xml 파일로 옮겨가면 됩니다.
logback.xml 파일을 logback-test.xml 파일로 사용하면 된다는 뜻 입니다.
16:43:03,514 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/C:/project/workspace/springboot/target/classes/logback-test.xml]
16:43:03,594 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
16:43:03,600 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/C:/project/workspace/springboot/target/classes/logback-test.xml]
16:43:03,600 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 30 seconds
없어졌죠..
2. logback.xml 을 logback-spring.xml 로 변경하면 됩니다.
16:45:32.000 [main] INFO c.s.springboot.SpringbootApplication - Starting SpringbootApplication using Java 11.0.14 on DESKTOP-M8928OS with PID 18920 (C:\project\workspace\springboot\target\classes started by [USER] in C:\project\workspace\springboot)
16:45:32.002 [main] DEBUG c.s.springboot.SpringbootApplication - Running with Spring Boot v2.6.3, Spring v5.3.15
16:45:32.002 [main] INFO c.s.springboot.SpringbootApplication - The following profiles are active: local
16:45:32.551 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
16:45:32.607 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 48 ms. Found 3 JPA repository interfaces.
16:45:33.155 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port(s): 9090 (http)
16:45:33.167 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
16:45:33.167 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.56]
logback-test.xml 파일을 찾았다라는 말도 없이 읽어 집니다.
logback-spring.xml 를 사용하면 Spring Boot 사용 시 좀 더 추가적인 기능을 사용할 수 있다고 합니다.
728x90