저는 log4j를 처음 사용합니다. 나는 log4j 1.2에서 log4j2로 응용 프로그램을 변환하고있다. log4j.properties 파일에서 다음과 같은 구성을 발견했습니다.log4j 1.2 구성을 log4j 2 구성으로 변환하십시오.
#############################################################
# Default Logging Configuration File
############################################################
############################################################
# Global properties
############################################################
handlers= java.util.logging.ConsoleHandler
.level= WARNING
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.xyz.foo.level = SEVERE
어떻게이 구성을 log4j2 구성으로 변환 할 수 있습니까?
감사합니다.
[this] (https://logging.apache.org/log4j/2.x/manual/migration.html)을 읽으셨습니까? –
예이 가이드를 읽었지만 변환 할 수 없었습니다. –
어떤 부분에서 실패하게됩니까? 내가 기억할 것은, 어떤 종류의 변환기 도구도 있어야한다는 것입니다 ... 아, 아뇨. 그것은 로그백이었다. – Fildor