1 45 46 package org.jfree.base.log; 47 48 import org.jfree.base.modules.AbstractModule; 49 import org.jfree.base.modules.ModuleInitializeException; 50 import org.jfree.base.modules.SubSystem; 51 import org.jfree.util.Log; 52 import org.jfree.util.PrintStreamLogTarget; 53 54 61 public class DefaultLogModule extends AbstractModule 62 { 63 68 public DefaultLogModule() throws ModuleInitializeException 69 { 70 loadModuleInfo(); 71 } 72 73 80 public void initialize(final SubSystem subSystem) 81 throws ModuleInitializeException 82 { 83 if (LogConfiguration.isDisableLogging()) 84 { 85 return; 86 } 87 88 if (LogConfiguration.getLogTarget().equals 89 (PrintStreamLogTarget.class.getName())) 90 { 91 DefaultLog.installDefaultLog(); 92 Log.getInstance().addTarget(new PrintStreamLogTarget()); 93 94 if ("true".equals(subSystem.getGlobalConfig().getConfigProperty 95 ("org.jfree.base.LogAutoInit"))) 96 { 97 Log.getInstance().init(); 98 } 99 Log.info("Default log target started ... previous log messages " + 100 "could have been ignored."); 101 } 102 } 103 } 104 | Popular Tags |