public void init() {
defaultLogInstance = new DefaultLog();
defaultLogInstance.addTarget(DEFAULT_LOG_TARGET);
try {
// check the system property. This is the developers backdoor to activate
// debug output as soon as possible.
final String property = System.getProperty("org.jfree.DebugDefault", "false");
if (Boolean.valueOf(property).booleanValue()) {
defaultLogInstance.setDebuglevel(LogTarget.DEBUG);
}
else {
defaultLogInstance.setDebuglevel(LogTarget.WARN);
}
}
catch (SecurityException se) {
defaultLogInstance.setDebuglevel(LogTarget.WARN);
}
removeTarget(DEFAULT_LOG_TARGET);
final String logLevel = LogConfiguration.getLogLevel();
if (logLevel.equalsIgnoreCase("error")) {
setDebuglevel(LogTarget.ERROR);
}
else if (logLevel.equalsIgnoreCase("warn")) {
setDebuglevel(LogTarget.WARN);
}
else if (logLevel.equalsIgnoreCase("info")) {
setDebuglevel(LogTarget.INFO);
}
else if (logLevel.equalsIgnoreCase("debug")) {
setDebuglevel(LogTarget.DEBUG);
}
}
Initializes the log system after the log module was loaded and a log target
was defined. This is the second step of the log initialisation. |