Exclude some classes from being logged in EMAIL appender in log4j

Home / Uncategorized / Exclude some classes from being logged in EMAIL appender in log4j

Question:
I am using properties file configuration for log4j.
log4j.rootLogger=INFO, A1, EMAIL
log4j.appender.EMAIL.Threshold = ERROR
I created email appender so errors would be sent to my email. There is exception that occures over 60000 times a day and i would like it to exclude it from logging.I added this line :log4j.logger.java.lang.IllegalStateException=OFF
but its still getting logged. Is there some other way of excluding it, maybe by filters ?


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *