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