[slf4j-user] [bug report]stack trace content lost

Jarod Liu liuyuanzhi at gmail.com
Fri Sep 19 05:47:05 CEST 2008


Hi all,
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



correct output:
----------------------------------------
11:33:38 ERROR [main]log.Logback.main -
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Integer
    at log.Logback.main(Logback.java:31)

after some time, output turns to as below:
--------------------------------------
11:44:18 ERROR [main]log.Logback.main -
java.lang.ClassCastException



test program:

public class Logback {

    private static Logger logger = LoggerFactory.getLogger(Logback.class);


    public static void main(String[] args) {
        Map m = new HashMap();
        m.put("a", "dsfd");

        while (true) {
            try {
                Integer a = (Integer) m.get("a");

            } catch (Exception e) {
                logger.error("", e);
            }
        }
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-user/attachments/20080919/02c4b05f/attachment.htm>


More information about the slf4j-user mailing list