Suppressing exceptions from SMTPAppender [log4j 1.3]

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Suppressing exceptions from SMTPAppender [log4j 1.3]

Christopher Schultz-2
All,

I've got an SMTPAppender logging errors, etc. and I'd like to remove the
exceptions from the log messages. Is there a good way to do that?

Remember: log4j 1.3.x (for now)

I happen to already be using a subclass of SMTPAppender that I wrote (so
only send after X number of log messages, rather than a separate SMTP
message for every log event), so I have some flexibility, there.

If it's not already in the API/config somewhere, could I simply override
the append(LogEvent) method to remove the ThrowableInformation from the
LogEvent object, then invoke the superclass's append() method?

Thanks,
-chris


signature.asc (956 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Suppressing exceptions from SMTPAppender [log4j 1.3]

Matt Sicker
Log4j 1.3? The last version of 1.x was 1.2.17 which is EOL.

On 12 July 2017 at 13:13, Christopher Schultz <[hidden email]>
wrote:

> All,
>
> I've got an SMTPAppender logging errors, etc. and I'd like to remove the
> exceptions from the log messages. Is there a good way to do that?
>
> Remember: log4j 1.3.x (for now)
>
> I happen to already be using a subclass of SMTPAppender that I wrote (so
> only send after X number of log messages, rather than a separate SMTP
> message for every log event), so I have some flexibility, there.
>
> If it's not already in the API/config somewhere, could I simply override
> the append(LogEvent) method to remove the ThrowableInformation from the
> LogEvent object, then invoke the superclass's append() method?
>
> Thanks,
> -chris
>
>


--
Matt Sicker <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Suppressing exceptions from SMTPAppender [log4j 1.3]

Ralph Goers
There was an experimental branch for Log4j 1.3 but that was never released and was abandoned.

Ralph

> On Jul 12, 2017, at 11:16 AM, Matt Sicker <[hidden email]> wrote:
>
> Log4j 1.3? The last version of 1.x was 1.2.17 which is EOL.
>
> On 12 July 2017 at 13:13, Christopher Schultz <[hidden email]>
> wrote:
>
>> All,
>>
>> I've got an SMTPAppender logging errors, etc. and I'd like to remove the
>> exceptions from the log messages. Is there a good way to do that?
>>
>> Remember: log4j 1.3.x (for now)
>>
>> I happen to already be using a subclass of SMTPAppender that I wrote (so
>> only send after X number of log messages, rather than a separate SMTP
>> message for every log event), so I have some flexibility, there.
>>
>> If it's not already in the API/config somewhere, could I simply override
>> the append(LogEvent) method to remove the ThrowableInformation from the
>> LogEvent object, then invoke the superclass's append() method?
>>
>> Thanks,
>> -chris
>>
>>
>
>
> --
> Matt Sicker <[hidden email]>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...