[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-user
Subject:    Logging to different destinations
From:       "Peter Munro" <pete () petermunro ! org>
Date:       2002-10-25 13:41:21
[Download RAW message or body]

Hi,

I want log output to go to 3 different destinations via Unix syslogd.
Reason: operations require syslogd support, to direct application errors,
system errors and user errors to appropriate people. Plus we can log to a
separate logging host.

So I'm using syslog facilities LOCAL1, LOCAL2 and LOCAL3 to identify the
'type' of message and hence its destination.

The trouble is, there's no way (I've seen) to select the facility at the
Logger level. Ideally I'd like to do:

  logger.error("local1", "Something went wrong");

or even:

  logger.error1("Something went wrong");


Currently, I have one Logger per class. I could configure 3
SyslogAppenders and tie each to a Logger just below rootLogger, but then
each class would have to know about 3 Loggers!

What's the best way to do this?

Many thanks in advance,
Pete

-- 
  Peter Munro
  pete@petermunro.org

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic