class Logger
Java.lang.Object
Java.util.logging.Logger
The Logger object is used to record log messages for a particular system or application component. You typically use a dot-delimited hierarchical namespace to name Logger. Logger names can be arbitrary strings, but they should generally be based on the package name or class name of the component being recorded, such as java.net or javax.swing. In addition, you can create an "anonymous" Logger whose name is not stored in the Logger namespace. 1, the Logger object can be obtained by invoking the factory method GetLogger or Getanonymouslogger.
Gets a Logger object named "a" Logger loggera= Logger.getlogger ("a"); Gets a Logger object named "A.b" whose parent logger is loggera.
Logger loggerab= Logger.getlogger ("a.b");
Gets an anonymous Logger object Logger loggertmp = Logger.getanonymouslogger (); For non-anonymous Logger,getlogger first find the Logger object of the same name in the namespace, and if so, return the Logger object, or, if not, create a new logger object in the namespace and associate it with its parent logger object. An anonymous logger object belongs to the private object of the object that created it, and can only be used by the object that created it, and some temporary log information is logged. The named Logger object is global and can be used by other objects to log information in addition to the object that created it during the lifetime of the log frame
2. The following message levels are defined in the j2sdk1.4 Java Logging framework: level name int value (Windows 2000 environment) off 2147483647 SEVERE 1000 WARNING 90 0 CONFIG FINE Finer FINEST-ALL-2147483648