tag:blogger.com,1999:blog-32637828.post4743220598705612483..comments2023-10-31T16:37:25.528+00:00Comments on fahd.blog: Send Email Alerts Using Log4j [Howto]Fahd Shariffhttp://www.blogger.com/profile/00919911016127601294noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-32637828.post-25437054365600985742010-12-20T15:43:46.533+00:002010-12-20T15:43:46.533+00:00Hi Fahd,
I followed the code that u posted. But I...Hi Fahd,<br /><br />I followed the code that u posted. But I'm not able to achieve it.. I am not getting any email when it throws log.error().Unknownhttps://www.blogger.com/profile/12988420034255475869noreply@blogger.comtag:blogger.com,1999:blog-32637828.post-64898519915784611762010-11-16T05:33:17.535+00:002010-11-16T05:33:17.535+00:00I want to add a throttling mechanism for sending e...I want to add a throttling mechanism for sending emails that will be added by extending the “TriggerEvaluator” class and adding a timing mechanism for sending emails related to the same trigger / error.<br /><br />How and where to do this?Dishihttp://dishijain.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-32637828.post-46182267169480265562010-07-08T16:37:43.389+01:002010-07-08T16:37:43.389+01:00In a multi-server environment situation, is there ...In a multi-server environment situation, is there a way that log4j logs the name of the server?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-32637828.post-22499263135130309012010-04-20T21:13:20.538+01:002010-04-20T21:13:20.538+01:00Setting log4j.appender.MAIL.Threshold=ERROR will p...Setting log4j.appender.MAIL.Threshold=ERROR will prevent sending emails for debug statements when you have logging cranked up to DEBUG level.Steve Stairhttps://www.blogger.com/profile/18197093621189411421noreply@blogger.comtag:blogger.com,1999:blog-32637828.post-24169985817830660632010-03-18T00:56:31.050+00:002010-03-18T00:56:31.050+00:00Is there a way to disable sending email message wh...Is there a way to disable sending email message when an error occurs.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-32637828.post-2737433268689364672008-12-19T19:33:00.000+00:002008-12-19T19:33:00.000+00:00hi!I used the code you have posted to alert when a...hi!<BR/>I used the code you have posted to alert when an error occurs, also added activation and mail.jar to my classpath. I am using jdk 1.6_03JDK, and so when I use eclipse to run, it works like a charm. However when I generate a JAR using fat jar (a plugin for eclipse for generating jars), I get wierd errors.. posted below..<BR/>any help here..<BR/>Exception in thread "Thread-1" java.lang.NoSuchMethodError: com.sun.mail.util.So<BR/>cketFetcher.getSocket(Ljava/lang/String;ILjava/util/Properties;Ljava/lang/String<BR/>;Z)Ljava/net/Socket;<BR/> at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)<BR/> at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:41<BR/>2)<BR/> at javax.mail.Service.connect(Service.java:233)<BR/> at javax.mail.Service.connect(Service.java:134)<BR/> at javax.mail.Service.connect(Service.java:86)<BR/> at javax.mail.Transport.send0(Transport.java:162)<BR/> at javax.mail.Transport.send(Transport.java:80)<BR/> at org.apache.log4j.net.SMTPAppender.sendBuffer(Unknown Source)<BR/> at org.apache.log4j.net.SMTPAppender.append(Unknown Source)<BR/> at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)<BR/><BR/> at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders<BR/>(AppenderAttachableImpl.java:57)<BR/> at org.apache.log4j.Category.callAppenders(Category.java:187)<BR/> at org.apache.log4j.Category.forcedLog(Category.java:372)<BR/> at org.apache.log4j.Category.error(Category.java:286)<BR/> at FileBasedLoggingDemo.run(FileBasedLoggingDemo.java:32)<BR/> at java.lang.Thread.run(Unknown Source)Unknownhttps://www.blogger.com/profile/01824463192215063719noreply@blogger.com