Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to add a handler to a logger via config (properties) file?

Reply
Thread Tools

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

 
 
Thilo Brandt
Guest
Posts: n/a
 
      09-26-2004
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.MyHandl er

Any help will be appreciated ...

Regs,
Thilo


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby's Logger vs ActiveRecord: no more Logger data output Georges Ko Ruby 4 07-26-2006 01:38 PM
why do i need to use org/apache/avalon/framework/logger/Logger to convert XSL-FO to PDF?? sachin XML 1 02-03-2006 09:58 PM
ruby's Logger conflict with Log4r's Logger cap Ruby 3 12-11-2005 03:44 PM
Logger Handler Question Rhino Java 3 03-10-2005 07:01 AM
Naming a logger's file handler output Robert Mark Bram Java 0 07-06-2004 03:35 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57