<div dir="ltr">Hi all, <br>I use slf4j(1.5.2) + logback(0.9.9) to do logging in my applications. I enouter a problem, while the load of logging going up, slf4j/logback well lost stack trace of a exception. Below is my test program and the test output<br>
<br><br><br>correct output:<br>----------------------------------------<br>11:33:38 ERROR [main]log.Logback.main - <br>java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer<br> at log.Logback.main(Logback.java:31)<br>
<br>after some time, output turns to as below:<br>--------------------------------------<br>11:44:18 ERROR [main]log.Logback.main - <br>java.lang.ClassCastException<br><br><br><br>test program:<br><br>public class Logback {<br>
<br> private static Logger logger = LoggerFactory.getLogger(Logback.class);<br><br><br> public static void main(String[] args) {<br> Map m = new HashMap();<br> m.put("a", "dsfd");<br>
<br> while (true) {<br> try {<br> Integer a = (Integer) m.get("a");<br><br> } catch (Exception e) {<br> logger.error("", e);<br> }<br>
}<br> }<br>}<br></div>