org.apache.hc.client5.http logger 중복 출력 문제 처리
- additive : false - add console appender
This commit is contained in:
@@ -898,7 +898,7 @@ public class Logger implements LogKeys {
|
||||
|
||||
String adapterLogLevel = pmanager.getProperty(LOGGER_ADAPTER_PREFIX, LOG_LEVEL);
|
||||
hc5Logger.setLevel(Level.toLevel(adapterLogLevel));
|
||||
hc5Logger.setAdditive(true);
|
||||
hc5Logger.setAdditive(false);
|
||||
|
||||
String appenderNames = pmanager.getProperty(LOGGER_ADAPTER_PREFIX, APPENDER);
|
||||
if(appenderNames!=null) {
|
||||
@@ -914,6 +914,12 @@ public class Logger implements LogKeys {
|
||||
}
|
||||
}
|
||||
|
||||
String console = loggerInfo.getProperty(CONSOLE);
|
||||
if((console!=null) && console.equals("on")) {
|
||||
hc5Logger.addAppender(consoleAppender);
|
||||
System.out.println("@ add ConsoleAppender to " + logger.getName());
|
||||
}
|
||||
|
||||
// * 거래 파일 로그 추가 코드
|
||||
// MDC txId가 있을 때만 SiftingAppender로 기록하는 필터
|
||||
// (txId 없는 일반 로그가 default.log로 쌓이는 것 방지)
|
||||
|
||||
Reference in New Issue
Block a user