How to add a handler to a logger via config (properties) file?

T

Thilo Brandt

Hi all,

I am currently forced to enable my application with SUNs Logging API (JDK
1.4.2). I found out that configuration for loggers can be provided by a
properties file and by coding. My concrete question: How can I assign a
dedicated Handler via properties file to a certain logger?
It seems to me that I can only define a set of handler globally:

handlers = java.util.logging.FileHandler <== seems globally
com.test.logger.level=ALL

How can I tell com.test.logger Logger to use none of the default handlers
but an other one?
This does not work:
com.test.logger.handlers=com.test.handlers.MyHandler

Any help will be appreciated ...

Regs,
Thilo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top