One easy way is to have two hierarchies of loggers and send one to
each appender.

logger com.product.package.foo is sent to the normal appender
logger notify.com.product.package.foo is sent to the syslog appender


On 1/6/06, Yassir Ahmed <[EMAIL PROTECTED]> wrote:
> I am sorry, I should be more descriptive
>
> There are some error situations that we want to send to syslog so that
> support guys receive email notification. There are some error situations
> that will resolve automatically without any support guys involement.
>
> So I am looking for the best way (and documentation/examples) to do
> something like this
>
> log.error("this error should fix automatically. its ok to ignore it for the
> time being")
> log.syslogError("date", "application name", "this error need support guy
> involement right away");
>
> The idea is that log.error(...) will write to only log file and
> syslogError(...) will write errors to syslog, Tivoli monitors syslog and can
> detect this error and can send email to support guys.
>
> log4j documentation discourage overriding Logger class. Even if I override
> it, how can I configure it to get the above described behavious? I am
> confused how to achive this.
>
> Thank you a lot.
>
>
>
>
> On 1/6/06, James Stauffer <[EMAIL PROTECTED]> wrote:
> >
> > How do you determine "some" vs. "other"?  Are they different loggers?
> >
> > On 1/6/06, Yassir Ahmed <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > >
> > > I want some "warn" and "error" messages to go to log file and other
> > "warn"
> > > and "error" messages to go to syslog. Any idea how can I do this.
> > >
> > > Please help.
> > >
> > > Thank you
> > >
> > >
> >
> >
> > --
> > James Stauffer
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to