/** * DefaultConstructor. Loads the module specification. * * @throws ModuleInitializeException if an error occured. */ public DefaultLogModule() throws ModuleInitializeException { loadModuleInfo(); }
/** * 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. */ public void init() { 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); } }
/** * Adds a log target to this facility. Log targets get informed, via the * LogTarget interface, whenever a message is logged with this class. * * @param target the target. */ public synchronized void addTarget(final LogTarget target) { super.addTarget(target); // as soon as there is a real log target added, we do no longer need // the default logging. This was only installed to be able to send messages // if the deepest basic logging failed. if (target != DEFAULT_LOG_TARGET) { removeTarget(DEFAULT_LOG_TARGET); } }
throws ModuleInitializeException if (LogConfiguration.isDisableLogging()) if (LogConfiguration.getLogTarget().equals (PrintStreamLogTarget.class.getName())) DefaultLog.installDefaultLog(); Log.getInstance().addTarget(new PrintStreamLogTarget());
for (int i = 0; i < activeModules.size(); i++) { final Module mod = (Module) activeModules.get(i); p.print(new PadMessage(mod.getModuleClass(), 70)); p.print(" ["); p.print(mod.getSubSystem());
/** * 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. */ public void init() { 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); } }
throws ModuleInitializeException if (LogConfiguration.isDisableLogging()) if (LogConfiguration.getLogTarget().equals (PrintStreamLogTarget.class.getName())) DefaultLog.installDefaultLog(); Log.getInstance().addTarget(new PrintStreamLogTarget());
for (int i = 0; i < activeModules.size(); i++) { final Module mod = (Module) activeModules.get(i); p.print(new PadMessage(mod.getModuleClass(), 70)); p.print(" ["); p.print(mod.getSubSystem());
/** * DefaultConstructor. Loads the module specification. * * @throws ModuleInitializeException if an error occured. */ public DefaultLogModule() throws ModuleInitializeException { loadModuleInfo(); }
/** * Adds a log target to this facility. Log targets get informed, via the * LogTarget interface, whenever a message is logged with this class. * * @param target the target. */ public synchronized void addTarget(final LogTarget target) { super.addTarget(target); // as soon as there is a real log target added, we do no longer need // the default logging. This was only installed to be able to send messages // if the deepest basic logging failed. if (target != DEFAULT_LOG_TARGET) { removeTarget(DEFAULT_LOG_TARGET); } }
/** * 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. */ public void init() { 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); } }
throws ModuleInitializeException if (LogConfiguration.isDisableLogging()) if (LogConfiguration.getLogTarget().equals (PrintStreamLogTarget.class.getName())) DefaultLog.installDefaultLog(); Log.getInstance().addTarget(new PrintStreamLogTarget());
for (int i = 0; i < activeModules.size(); i++) { final Module mod = (Module) activeModules.get(i); p.print(new PadMessage(mod.getModuleClass(), 70)); p.print(" ["); p.print(mod.getSubSystem());
/** * DefaultConstructor. Loads the module specification. * * @throws ModuleInitializeException if an error occured. */ public DefaultLogModule() throws ModuleInitializeException { loadModuleInfo(); }
/** * Adds a log target to this facility. Log targets get informed, via the * LogTarget interface, whenever a message is logged with this class. * * @param target the target. */ public synchronized void addTarget(final LogTarget target) { super.addTarget(target); // as soon as there is a real log target added, we do no longer need // the default logging. This was only installed to be able to send messages // if the deepest basic logging failed. if (target != DEFAULT_LOG_TARGET) { removeTarget(DEFAULT_LOG_TARGET); } }
/** * Initializes all previously uninitialized modules. Once a module is initialized, * it is not re-initialized a second time. */ public synchronized void initializeModules() { // sort by subsystems and dependency PackageSorter.sort(this.modules); for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.configure(this.booter)) { Log.debug(new Log.SimpleMessage("Conf: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.initialize(this.booter)) { Log.debug(new Log.SimpleMessage("Init: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } }
/** * Initializes all previously uninitialized modules. Once a module is initialized, * it is not re-initialized a second time. */ public synchronized void initializeModules() { // sort by subsystems and dependency PackageSorter.sort(this.modules); for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.configure(this.booter)) { Log.debug(new Log.SimpleMessage("Conf: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.initialize(this.booter)) { Log.debug(new Log.SimpleMessage("Init: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } }
/** * Initializes all previously uninitialized modules. Once a module is initialized, * it is not re-initialized a second time. */ public synchronized void initializeModules() { // sort by subsystems and dependency PackageSorter.sort(this.modules); for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.configure(this.booter)) { Log.debug(new Log.SimpleMessage("Conf: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.initialize(this.booter)) { Log.debug(new Log.SimpleMessage("Init: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } }