| Author |
log4j.xml logger name
|
Andy Hahn
Ranch Hand
Joined: Aug 31, 2004
Posts: 225
|
|
In every example I can find, a logger "name" references a package - ex. com.foo.
What if I want to give the logger an arbitrary name so that any class can call a logger?
Is this good design?
Thanks
|
 |
Carol Enderlin
drifter
Ranch Hand
Joined: Oct 10, 2000
Posts: 1348
|
|
Have you read the log4j short manual where it discusses the advantages of a hierarchical naming convention for loggers?
At a very minimum use of different logger names helps me decipher where the logging comes from when trying to troubleshoot an issue from the logs (without the performance hit of logging more detailed information about class or other location information). It is useful to apply different logging levels to different loggers and to route different messages into different destinations.
Of course, it is OK to use another naming system that fits your needs.
|
 |
 |
|
|
subject: log4j.xml logger name
|
|
|