Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 92196 invoked from network); 24 May 2007 07:17:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 May 2007 07:17:14 -0000 Received: (qmail 8386 invoked by uid 500); 24 May 2007 07:17:20 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 8364 invoked by uid 500); 24 May 2007 07:17:19 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 8355 invoked by uid 99); 24 May 2007 07:17:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 00:17:19 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 00:17:13 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 8043B1A981A; Thu, 24 May 2007 00:16:53 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r541210 - /harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java Date: Thu, 24 May 2007 07:16:53 -0000 To: commits@harmony.apache.org From: hindessm@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070524071653.8043B1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hindessm Date: Thu May 24 00:16:52 2007 New Revision: 541210 URL: http://svn.apache.org/viewvc?view=rev&rev=541210 Log: Applying patches from "[#HARMONY-3951] [classlib] [logging] Updated Javadoc class description for java.util.logging.LogManager". Modified: harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java Modified: harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java?view=diff&rev=541210&r1=541209&r2=541210 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java (original) +++ harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java Thu May 24 00:16:52 2007 @@ -43,99 +43,81 @@ import org.apache.harmony.logging.internal.nls.Messages; /** - * LogManager is used to maintain configuration properties of the - * logging framework, and to manage a hierarchical namespace of all named - * Logger objects. + * LogManager is used to manage named Loggers and + * any shared logging properties. *

- * There is only one global LogManager instance in the - * application, which can be get by calling static method - * LogManager.getLogManager(). This instance is created and - * initialized during class initialization and cannot be changed. + * There is one global LogManager instance in the application, + * which can be obtained by calling the static method + * LogManager.getLogManager(). *

*

- * The LogManager class can be specified by - * java.util.logging.manager system property, if the property is unavailable or - * invalid, the default class java.util.logging.LogManager will - * be used. + * All methods on this type can be taken as being thread safe. + *

+ *

+ * The LogManager class can be specified by the + * "java.util.logging.manager" system property. If the property is unavailable + * or invalid java.util.logging.LogManager will be used by + * default. *

*

- * When initialization, LogManager read its configuration from a - * properties file, which by default is the "lib/logging.properties" in the JRE - * directory. + * On initialization, LogManager reads its configuration data + * from a properties file, which by default is the "lib/logging.properties" file + * in the JRE directory. *

*

- * However, two optional system properties can be used to customize the initial - * configuration process of LogManager. + * However, two system properties can be used instead to customize the + * initialization of the LogManager: *

    *
  • "java.util.logging.config.class"
  • *
  • "java.util.logging.config.file"
  • *
*

*

- * These two properties can be set in three ways, by the Preferences API, by the - * "java" command line property definitions, or by system property definitions - * passed to JNI_CreateJavaVM. + * These properties can be set either by using the Preferences API, as a command + * line option or by passing the appropriate system property definitions to + * JNI_CreateJavaVM. *

*

- * The "java.util.logging.config.class" should specifies a class name. If it is - * set, this given class will be loaded and instantiated during - * LogManager initialization, so that this object's default - * constructor can read the initial configuration and define properties for + * The "java.util.logging.config.class" property should specify a class name. If + * it is set, this class will be loaded and instantiated during + * LogManager's initialization, so that this object's default + * constructor can read the initial configuration and define properties for the * LogManager. *

*

- * If "java.util.logging.config.class" property is not set, or it is invalid, or - * some exception is thrown during the instantiation, then the - * "java.util.logging.config.file" system property can be used to specify a - * properties file. The LogManager will read initial - * configuration from this file. - *

- *

- * If neither of these properties is defined, or some exception is thrown - * during these two properties using, the LogManager will read - * its initial configuration from default properties file, as described above. + * The "java.util.logging.config.file" system property can be used to specify a + * properties file if the "java.util.logging.config.class" property has not been + * used. This file will be read instead of the default properties file. *

*

- * The global logging properties may include: + * Some global logging properties are as follows: *

    - *
  • "handlers". This property's values should be a list of class names for - * handler classes separated by whitespace, these classes must be subclasses of - * Handler and each must have a default constructor, these - * classes will be loaded, instantiated and registered as handlers on the root - * Logger (the Logger named ""). These - * Handlers maybe initialized lazily.
  • - *
  • "config". The property defines a list of class names separated by - * whitespace. Each class must have a default constructor, in which it can - * update the logging configuration, such as levels, handlers, or filters for - * some logger, etc. These classes will be loaded and instantiated during - * LogManager configuration
  • + *
  • "handlers" - a list of handler classes, separated by whitespace. These + * classes must be subclasses of Handler and must have a public + * no-argument constructor. They will be registered with the root + * Logger.
  • + *
  • "config" - a list of configuration classes, separated by whitespace. + * These classes should also have a public no-argument default constructor, + * which should contain all the code for applying that configuration to the + * logging system. *
*

*

- * This class, together with any handler and configuration classes associated - * with it, must be loaded from the system classpath when - * LogManager configuration occurs. + * Besides global properties, properties for individual Loggers + * and Handlers can be specified in the property files. The names + * of these properties will start with the fully qualified name of the handler + * or logger. *

*

- * Besides global properties, the properties for loggers and Handlers can be - * specified in the property files. The names of these properties will start - * with the complete dot separated names for the handlers or loggers. - *

- *

- * In the LogManager's hierarchical namespace, - * Loggers are organized based on their dot separated names. For - * example, "x.y.z" is child of "x.y". + * The LogManager organizes Loggers based on their + * fully qualified names. For example, "x.y.z" is child of "x.y". *

*

* Levels for Loggers can be defined by properties whose name end - * with ".level". Thus "alogger.level" defines a level for the logger named as - * "alogger" and for all its children in the naming hierarchy. Log levels - * properties are read and applied in the same order as they are specified in - * the property file. The root logger's level can be defined by the property - * named as ".level". - *

- *

- * All methods on this type can be taken as being thread safe. + * with ".level". For example, "alogger.level = 4" sets the level for the logger + * "alogger" to 4, Any children of "alogger" will also be given the level 4 + * unless specified lower down in the properties file. The property ".level" + * will set the log level for the root logger. *

* */