java - Log4j DailyRollingFileAppender vs ConsoleAppender performance -
we're using log4j v1.2.14. we're using org.apache.log4j.consoleappender , we've requirement/need have daily rotating logs in place. hence, we're planning use org.apache.log4j.dailyrollingfileappender have daily rotating logs.
my question is, dailyrollingfileappender additional overhead/have performance impact on consoleappender, because has additionally check whether file has rotated/rollover in each print statement?
any opinions/user experience appreciated.
your arguments correct , logic dictates overhead/performance impact exists. how much? should measure if you're afraid of performance hit.
it depends on how many logging statements have. lots of debugging statements worst because can impact performance, unless using guards of type logger.isdebugenabled()
.
if can afford it, i'd suggest switching slf4j logback underlying implementation. logback's main focus speed , seems go great lengths make sure it's faster other logging systems.
Comments
Post a Comment