Register / Login
this forum made possible by our volunteer staff, including ...
Roel De Nijs
Stephan van Hulst
Other JSE/JEE APIs
Logging: same handler, different formatters
posted 9 years ago
I'm writing some logging code for my application, but I faced a problem:
I have two classes, which logging need to be directed to a file.
These two classes log things of a different domain; this would fit perfectly with the idea of having two formatters.
But the problem is:
how can I send different logs with different formatters to the same handler?
I have to use the same file handler, which means I have to add it to the root handler, but how to separate the formatting behavior?
Using a text editor for programming.
Boost this thread!
NX: which logging file?
Customize Logger Problem
Doubt in JSP taglibs on using the doStartTag() method
choice between absract class and interface?