danw
danw

Reputation: 1648

Mule - exclude certain lines from logs

I'm looking for a way to exclude a specific line from the logs for my Mule application. I'm using an in-memory database for a flat file integration where each row of a 100k+ line csv file is inserted row-by-row into a database. For each row inserted I get a log message:

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

This is resulting in 100k+ log messages of the above format which isn't ideal. Is there a way I can edit my log properties (included below) to exclude lines matching a certain format?

# 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

Upvotes: 0

Views: 353

Answers (1)

Seba
Seba

Reputation: 2319

Change the logging level of org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy to either WARN or ERROR:

log4j.logger.org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrateg=WARN

Upvotes: 2

Related Questions