• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

log4j performance on limits

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone share insight into performance questions with log4j? Specifically, I have code with various levels of logging running under jboss5. Lots of info, debug, and trace.

If I set a category limit to TRACE like this:

<category name="com.mydomain">
<priority value="TRACE"/>
</category>

But under my appender I have this threshold:

<param name="Threshold" value="DEBUG"/>

Will I still have the performance hit of my TRACE statements going through the logger routines but just not being printed? In other words, would it be less load if I set my category to DEBUG like:

<category name="com.mydomain">
<priority value="DEBUG"/>
</category>


The downside of this is that if I ask my customer to enable TRACE, they would have to change it in two places. But if it's a big performance hit, then we'll consider it.

Thank you!
 
Sheriff
Posts: 26765
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The documentation for log4j addresses that issue specifically. Read it here: http://logging.apache.org/log4j/1.2/manual.html and look at the section headed "Performance". Also bear in mind that it was written over a decade ago and any specific numbers mentioned apply to decade-old computers.
reply
    Bookmark Topic Watch Topic
  • New Topic