Question

What should we use in jboss-log4j.xml in order to turn on/off traces for our product - "category" or "logger" tag?

By default JBoss uses "category" in jboss-log4j.xml.
But as far as I know "category" is deprecated and "logger" should be used instead.
Why JBoss uses deprecated "category" tag in a new product?

Was it helpful?

Solution

Habit, I suspect. I still to use category also. It behaves exactly the same as logger, there really is no difference.

OTHER TIPS

category in the log4j.xml (not limited to jboss-log4j.xml) is common practice and its not deprecated. What got deprecated is the Category Class as in usage of Category in code like,

Category category = Category.getInstance('something');

In log4j.xml, both category and logger can be used. Probably the newer code will have the logger in log4j.xml. Old way is category.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top