[slf4j-user] disappearing log levels
Cameron Taggart
cameron.taggart at gmail.com
Sat Jun 10 02:38:55 CEST 2006
Sorry if this is slightly off topic as I have boiled this down to more
of a log4j issue. I'm using SLF4J in my project, but a third party
library uses log4j directly. When I call one of their methods all
logging statements bellow ERROR Level seem to disappear. I've tried
passing in -Dlog4j.debug=true -Dlog4j.disableOverride=true to the
application and it doesn't seem to help. I tried using log4j 1.2.8
and the 1.2.13. log4j.debug doesn't mention anything about being
overridden.
Here is sample code and output.
package test;
import org.apache.log4j.Logger;
import com.crystaldecisions.reports.sdk.ReportClientDocument;
/** What are the CR4E libraries doing with log4j? */
public class DisappearingLog4j {
private final static Logger log = Logger.getLogger(DisappearingLog4j.class);
private final static String file = "CrystalReport1.rpt";
public static void main(String[] args) throws Exception {
ReportClientDocument clientDoc = new ReportClientDocument();
log.debug("This debug statement shows up.");
log.info("This info statement shows up.");
log.warn("This warn statement shows up.");
log.error("This error statement shows up.");
clientDoc.open(file, 0);
log.debug("This debug statement does not show up!!!");
log.info("This info statement does not show up!!!");
log.warn("This warn statement does not show up!!!");
log.error("This error statement shows up.");
}
}
2006-06-09 17:30:19,603 DEBUG test.DisappearingLog4j This debug
statement shows up.
2006-06-09 17:30:19,603 INFO test.DisappearingLog4j This info
statement shows up.
2006-06-09 17:30:19,603 WARN test.DisappearingLog4j This warn
statement shows up.
2006-06-09 17:30:19,603 ERROR test.DisappearingLog4j This error
statement shows up.
2006-06-09 17:30:21,065 ERROR test.DisappearingLog4j This error
statement shows up.
Any help is appreciated.
Cameron
More information about the slf4j-user
mailing list