This approach will also help to speed logging up. Given you intend to log a
debug event, then test it as shown and only go through the lengthy cycles if
debug logging is in fact enabled That approach checks a boolean first before it
eats up cpu cycles.
if ( log.isDebugEnabled() )
{
// Uses many cpu cycles:
String fancyLogString = buildFancyLogString();
// Does nothing because "debug" is currently disabled in
log4j.properties:
log.debug( fancyLogString );
}
-----Ursprüngliche Nachricht-----
Von: Stadelmann Josef [mailto:[email protected]]
Gesendet: Donnerstag, 11. August 2011 09:57
An: Log4J Users List
Betreff: AW: a log4j analyzer
How do you measure?
What is he difference between
Raising the log level to fatal == no logging if that application runs
Raising the log level to info
Raising the log level to debug or trace or all
What is the time difference you see under your setup which we don't know.
Josef
Alias Sepp
-----Ursprüngliche Nachricht-----
Von: Fernando Wermus [mailto:[email protected]]
Gesendet: Mittwoch, 10. August 2011 20:25
An: [email protected]
Betreff: a log4j analyzer
Hi all,
We are facing some performance problems and we would like to use a tool
to analyze our logs to make a point. Which is your experience about it?
thanks in advance
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]