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

Discussion in 'Java' started by Thilo Brandt, Sep 26, 2004.

  1. Thilo Brandt

    Thilo Brandt Guest

    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
    Thilo Brandt, Sep 26, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rhino

    Logger Handler Question

    Rhino, Jan 7, 2004, in forum: Java
    Replies:
    3
    Views:
    2,498
    Takuya Murata
    Mar 10, 2005
  2. Robert Mark Bram

    Naming a logger's file handler output

    Robert Mark Bram, Jul 6, 2004, in forum: Java
    Replies:
    0
    Views:
    453
    Robert Mark Bram
    Jul 6, 2004
  3. sachin
    Replies:
    1
    Views:
    963
    Soren Kuula
    Feb 3, 2006
  4. cap
    Replies:
    3
    Views:
    282
    James Edward Gray II
    Dec 11, 2005
  5. Georges Ko
    Replies:
    4
    Views:
    266
    Georges Ko
    Jul 26, 2006
Loading...

Share This Page