Log4j disables stack trace after exception repetition
Hi fellows!
Our application uses Log4j-1.2.15 and is deployed at Tomcat-5.5.
Due to an error at production job, an exception was logged several times.
The odd is that the exception, after some repetitions, began to be logged without the stack trace.
Code:
2009-06-24 11:58:17,695 ERROR [Thread-47] ...
java.lang.NullPointerException
at br.com.neolog.model.occurrence.LoadDataLog.<init>(LoadDataLog.java:33)
at br.com.neolog.model.occurrence.CurrentTransactionLoadedLoadRegister.registerLoad(CurrentTransactionLoadedLoadRegister.java:47)
at br.com.neolog.model.occurrence.LoadChangeOccurenceHibernateEventListener.onPostLoad(LoadChangeOccurenceHibernateEventListener.java:30)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:221)
...
after some repetitions stack trace is being omitted
...
2009-06-24 12:12:50,932 ERROR [Thread-286] ...
java.lang.NullPointerException
2009-06-24 12:12:51,947 ERROR [Thread-286] ...
java.lang.NullPointerException
2009-06-24 12:12:52,227 ERROR [Thread-286] ...
java.lang.NullPointerException
2009-06-24 12:12:55,572 ....
...
This occurred twice, with different exceptions and in different appenders.
We can't reproduce this situation at development environment (thousands of repetitions and all stack traces were logged).
Is there some configuration or property in Log4j (or Tomcat) that disables stack trace after some repetitions for a particular exception?
Thanks in advance!
vmb