我正在寻找一种从我的Mule应用程序的日志中排除特定行的方法。我使用内存数据库进行平面文件集成,其中100k +行csv文件的每一行逐行插入到数据库中。对于插入的每一行,我都会收到一条日志消息:
INFO 2014-03-12 17:52:55,878 [[processes].apache-derby.dispatcher.08] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
这导致上述格式的100k +日志消息并非理想。有没有办法可以编辑我的日志属性(包括在下面)以排除匹配某种格式的行?
# Default log level
log4j.rootCategory=INFO, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%-5p %d [%t] %c: %m%n
################################################
# You can set custom log levels per-package here
################################################
# CXF is used heavily by Mule for web services
log4j.logger.org.apache.cxf=WARN
# Apache Commons tend to make a lot of noise which can clutter the log.
log4j.logger.org.apache=WARN
# Reduce startup noise
log4j.logger.org.springframework.beans.factory=WARN
# Mule classes
log4j.logger.org.mule=INFO
答案 0 :(得分:2)
将org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy
的日志记录级别更改为 WARN 或错误:
log4j.logger.org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrateg = WARN