qt log4qt 不同级别日志保存不同日志文件
各位老师好!
我在qt 中配置 log4j 使用的是log4qt,其他都没有问题。需要配置不同级别的日志保存不同的日志文件时,出现如下错误:
error Log4Qt::Factory - Cannot convert to type 'Level' for property 'threshold' on object of class 'Log4Qt::DailyRollingFileAppender' <Log4Qt::Factory::CONFIGURATOR_UNKNOWN_TYPE_ERROR,29>
配置文件清单log4qt.properties
# Libfetion-gui project
# define the root logger with two appenders writing to console and file
log4j.rootLogger =DEBUG,Console,Roll_INFO,Roll_ERROR,Roll_DEBUG
####outputlog to console#########
#define the appender named CONSOLE
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p %x %m%n
log4j.appender.Roll_INFO=org.apache.log4j.DailyRollingFileAppender
log4j.appender.Roll_INFO.File=logs/info_log.txt
log4j.appender.Roll_INFO.Threshold = INFO
log4j.appender.Roll_INFO.layout=org.apache.log4j.PatternLayout
log4j.appender.Roll_INFO.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c] [%p] - %m%n
log4j.appender.Roll_DEBUG=org.apache.log4j.DailyRollingFileAppender
log4j.appender.Roll_DEBUG.File=logs/debug_log.txt
log4j.appender.Roll_DEBUG.Threshold = DEBUG
log4j.appender.Roll_DEBUG.layout=org.apache.log4j.PatternLayout
log4j.appender.Roll_DEBUG.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c] [%p] - %m%n