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 "geek.shrek" <mi...@yahoo.com> on 2008/10/08 06:46:47 UTC

sending log4j from java mail

Hi,

I'm not sure if this is the right forum to ask about javax.mail and log4j.

I want to send an email when log4j create a WARNING level and I would like to send it not from log4j but from java mail.

The reason I'm sending email from java mail because I would like to add
some extra into the email body and manage where can I put the log
message.
Also, I want to send email when the application reach certain point whether including all the warnings up to that point.
for example the email will look like below


"bla bla Add some note here.... bla bla "
 
2008-10-08 13:40:15,915 WARN [com.test.HelloWorld] - Warning no. 41 
2008-10-08 13:40:15,916 WARN [com.test.HelloWorld] - Warning no. 42 
2008-10-08 13:40:15,916 WARN [com.test.HelloWorld] - Warning no. 43 
2008-10-08 13:40:15,916 WARN [com.test.HelloWorld] - Warning no. 44 
2008-10-08 13:40:15,916 WARN [com.test.HelloWorld] - Warning no. 45 
 
Thanks,
Hello World


Does anyone have any ideas how can I do this? Should I create my own logger and collect the logging?
I hope I explain my problem clearly.

Thanks,