사용자 도구

사이트 도구


java:slf4j

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
java:slf4j [2018/10/23 09:37]
kwon37xi
java:slf4j [2023/11/30 14:13]
kwon37xi [Test Slf4j]
줄 12: 줄 12:
 <code java> <code java>
 // 자동으로 현재 클래스를 찾아낸다. // 자동으로 현재 클래스를 찾아낸다.
-private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());+import java.lang.invoke.MethodHandles; 
 + 
 +private static final Logger logger =  
 +  LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 </code> </code>
  
줄 63: 줄 66:
         configuration.exclude group: 'commons-logging', module: 'commons-logging'         configuration.exclude group: 'commons-logging', module: 'commons-logging'
         configuration.exclude group: 'log4j', module: 'log4j'         configuration.exclude group: 'log4j', module: 'log4j'
 +        configuration.exclude group: 'org.apache.logging.log4j'
         configuration.exclude group: 'org.slf4j', module: 'slf4j-log4j12'         configuration.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
         configuration.exclude group: 'org.slf4j', module: 'slf4j-jcl'         configuration.exclude group: 'org.slf4j', module: 'slf4j-jcl'
줄 120: 줄 124:
 handlers = org.slf4j.bridge.SLF4JBridgeHandler handlers = org.slf4j.bridge.SLF4JBridgeHandler
 </code> </code>
-=== Logback 설청 ===+=== Logback 설정 ===
   * ''LevelChangePropagator'' 필요(http://logback.qos.ch/manual/configuration.html)   * ''LevelChangePropagator'' 필요(http://logback.qos.ch/manual/configuration.html)
     * groovy 설정<code groovy>     * groovy 설정<code groovy>
줄 171: 줄 175:
  
 ===== Test Slf4j ===== ===== Test Slf4j =====
 +  * [[https://www.simplify4u.org/slf4j-mock/|SLF4J mock]] : slf4j 2.x 까지 반영된 최신 라이브러리
   * [[http://projects.lidalia.org.uk/slf4j-test/|SLF4J Test]]   * [[http://projects.lidalia.org.uk/slf4j-test/|SLF4J Test]]
 +  * [[https://github.com/portingle/slf4jtesting|portingle/slf4jtesting: SLF4J Testing library optimised for test concurrency and dependency injection]]
 +  * http://www.spf4j.org/spf4j-slf4j-test/index.html
  
 ===== 참조 ===== ===== 참조 =====
   * [[https://examples.javacodegeeks.com/enterprise-java/slf4j/slf4j-tutorial-beginners/|SLF4J Tutorial for Beginners | Examples Java Code Geeks - 2018]]   * [[https://examples.javacodegeeks.com/enterprise-java/slf4j/slf4j-tutorial-beginners/|SLF4J Tutorial for Beginners | Examples Java Code Geeks - 2018]]
  
java/slf4j.txt · 마지막으로 수정됨: 2023/12/07 10:32 저자 kwon37xi