54 * 55 * When the logging facility is enabled (at startup or runtime), 56 * the java.util.logging.Logger will be created for each platform 57 * logger and all log messages will be forwarded to the Logger 58 * to handle. 59 * 60 * Logging facility is "enabled" when one of the following 61 * conditions is met: 62 * 1) a system property "java.util.logging.config.class" or 63 * "java.util.logging.config.file" is set 64 * 2) java.util.logging.LogManager or java.util.logging.Logger 65 * is referenced that will trigger the logging initialization. 66 * 67 * Default logging configuration: 68 * global logging level = INFO 69 * handlers = java.util.logging.ConsoleHandler 70 * java.util.logging.ConsoleHandler.level = INFO 71 * java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter 72 * 73 * Limitation: 74 * <JAVA_HOME>/lib/logging.properties is the system-wide logging 75 * configuration defined in the specification and read in the 76 * default case to configure any java.util.logging.Logger instances. 77 * Platform loggers will not detect if <JAVA_HOME>/lib/logging.properties 78 * is modified. In other words, unless the java.util.logging API 79 * is used at runtime or the logging system properties is set, 80 * the platform loggers will use the default setting described above. 81 * The platform loggers are designed for JDK developers use and 82 * this limitation can be workaround with setting 83 * -Djava.util.logging.config.file system property. 84 * 85 * @since 1.7 86 */ 87 public class PlatformLogger { 88 89 // The integer values must match that of {@code java.util.logging.Level} 90 // objects. 91 private static final int OFF = Integer.MAX_VALUE; 92 private static final int SEVERE = 1000; 93 private static final int WARNING = 900; 94 private static final int INFO = 800; 95 private static final int CONFIG = 700; 96 private static final int FINE = 500; 97 private static final int FINER = 400; | 54 * 55 * When the logging facility is enabled (at startup or runtime), 56 * the java.util.logging.Logger will be created for each platform 57 * logger and all log messages will be forwarded to the Logger 58 * to handle. 59 * 60 * Logging facility is "enabled" when one of the following 61 * conditions is met: 62 * 1) a system property "java.util.logging.config.class" or 63 * "java.util.logging.config.file" is set 64 * 2) java.util.logging.LogManager or java.util.logging.Logger 65 * is referenced that will trigger the logging initialization. 66 * 67 * Default logging configuration: 68 * global logging level = INFO 69 * handlers = java.util.logging.ConsoleHandler 70 * java.util.logging.ConsoleHandler.level = INFO 71 * java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter 72 * 73 * Limitation: 74 * <JAVA_HOME>/conf/logging.properties is the system-wide logging 75 * configuration defined in the specification and read in the 76 * default case to configure any java.util.logging.Logger instances. 77 * Platform loggers will not detect if <JAVA_HOME>/conf/logging.properties 78 * is modified. In other words, unless the java.util.logging API 79 * is used at runtime or the logging system properties is set, 80 * the platform loggers will use the default setting described above. 81 * The platform loggers are designed for JDK developers use and 82 * this limitation can be workaround with setting 83 * -Djava.util.logging.config.file system property. 84 * 85 * @since 1.7 86 */ 87 public class PlatformLogger { 88 89 // The integer values must match that of {@code java.util.logging.Level} 90 // objects. 91 private static final int OFF = Integer.MAX_VALUE; 92 private static final int SEVERE = 1000; 93 private static final int WARNING = 900; 94 private static final int INFO = 800; 95 private static final int CONFIG = 700; 96 private static final int FINE = 500; 97 private static final int FINER = 400; |