📄 loggingconfigurator.java
字号:
/** * $Source: /home/ws/rz65/CVS-Repository/WorkflowProjects/JBPM-Demo/src/java/jbpmdemo/logging/LoggingConfigurator.java,v $ * $Revision: 1.1 $ * $Date: 2005/03/05 12:16:28 $ * $Author: rz65 $ * * Copyright (c) 2005 Universitaet Karlsruhe (TH) / Rechenzentrum (RZ-UNI-UKA) * * RZ-UNI-KA makes no representations or warranties about the suitability * of this software, either express or implied, including but not limited * to the implied warranties of merchantability, fitness for a particular * purpose, or non-infringement. RZ-UNI-KA shall not be liable for any * damages as a result of using, modifying or distributing this software * or its derivatives. */package jbpmdemo.logging;import jbpmdemo.logging.LoggingConstants;import org.apache.log4j.BasicConfigurator;import org.apache.log4j.xml.DOMConfigurator;/** * This class configures the logging system. * * <p> * * @version $Revision: 1.1 $ * @author mailto:harald.meyer@rz.uni-karlsruhe.de */public class LoggingConfigurator extends Object implements LoggingConstants { // prevent instantiation private LoggingConfigurator() { } // indicates whether configuration was already done. private static boolean done = false; /** * Configures the logging system. This method searches for a system property * whose name matches the argument string. If this system property exists, * its value is regarded as the path to an XML logging configuration file. * Otherwise, a simple default configuration is achieved. * * @param key * The system property key that identifies the path to the * configuration file. */ public static void configure(String key) { if (done) return; done = true; String path = System.getProperty(key); if (path == null) { BasicConfigurator.configure(); } else { DOMConfigurator.configure(path); } } /** * Configures the logging system from the default configuration path. */ public static void configure() { configure(SYSPROP_KEY_LOGGING_CONFIGURATION); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -