Note that there are some explanatory texts on larger screens.

plurals
  1. POtrigger email to different ids depend on loglevel
    primarykey
    data
    text
    <p>I created an application with different levels of logging. Now I got into a situation to log errors to dev team and fatal to dev and admin. here is the code I had given a try..</p> <pre><code> log4j.rootlogger=DEBUG, email, email2 #email log4j.appender.email=org.apache.log4j.net.SMTPAppender log4j.appender.email.SMTPHost=smtp.company.com log4J.appender.email.Threshold=error log4j.appender.email.From=emailNotification log4j.appender.email.To=dev@company.com log4j.appender.email.SMTPUsername=user@company.com log4j.appender.email.Subject=email Notification from Tomcat Server log4j.appender.email.layout=org.apache.log4j.PatternLayout log4j.appender.email.layout.ConversionPattern=%d%d{dd MMM HH:mm:ss}%p %t %c - %m%n log4j.appender.email.BufferSize=1 #email2 log4j.appender.email2=org.apache.log4j.net.SMTPAppender log4j.appender.email2.SMTPHost=smtp.company.com log4J.appender.email2.Threshold=FATAL log4j.appender.email2.From=emailNotification log4j.appender.email2.To=admin@company.com, manager@company.com log4j.appender.email2.SMTPUsername=user@company.com log4j.appender.email2.Subject=email Notification from Tomcat Server log4j.appender.email2.layout=org.apache.log4j.PatternLayout log4j.appender.email2.layout.ConversionPattern=%d%d{dd MMM HH:mm:ss}%p %t %c - %m%n log4j.appender.email2.BufferSize=1 </code></pre> <p>when I run my application with</p> <pre><code> logger.error("error:"+e); </code></pre> <p>it was triggering email to admin and manager also. so even it is error/fatal it is triggering to all.</p> <p>any trick? can someone help me. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload