You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Charles Li <cl...@yahoo.com> on 2005/09/21 17:23:27 UTC
log4j log and j2ee container log
Hi,
I have a j2ee application that is setup to use log4j
log.
It write error messages to the log4j log, but it also
writes the same message to the j2ee container log.
How can I make it only write to the log4j log?
Below is a sample code:
63 try {
64 setValues(newHostName, messages, context);
65 } catch (Exception e) {
66 new DEPException(logger, e);
67 }
68 }
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: log4j log and j2ee container log
Posted by James Stauffer <st...@gmail.com>.
Why are you passing the logger to the DEPException? Normally you
would do something like:
63 try {
64 setValues(newHostName, messages, context);
65 } catch (Exception e) {
66 new DEPException(e);// or logger.error("blah", e);
67 }
68 }
On 9/21/05, Charles Li <cl...@yahoo.com> wrote:
> Hi,
> I have a j2ee application that is setup to use log4j
> log.
> It write error messages to the log4j log, but it also
> writes the same message to the j2ee container log.
> How can I make it only write to the log4j log?
>
> Below is a sample code:
> 63 try {
> 64 setValues(newHostName, messages, context);
> 65 } catch (Exception e) {
> 66 new DEPException(logger, e);
> 67 }
> 68 }
>
> Thanks.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org