Java.util.logging.Logger use of the detailed

Source: Internet
Author: User

Overview:

Part 1th Creating a Logger object

2nd level of Log

Part 3rd Handler

Part 4th Formatter

Part 5th Customization

The hierarchical relationship of the 6th part of Logger

Reference

Part 1th Creating a Logger object

To use the J2SE logging function, first obtain the Java.util.logging.Logger instance, which can be obtained through the two static GetLogger () methods of the Logger class:

Static Logger GetLogger (String name) to          Find or create a Logger.  static  Logger GetLogger (string name, String resourcebundlename)          finds or creates a Logger for the specified subsystem. 

Note: Name is logger, and when the name is the same, only one of the logger of the same name is created.

Here's a simple example:

2nd level of Log

Part 3rd Handler 4th part formatter 5th section Customizing the hierarchy relationship of the 6th part logger

Reference:

Java.util.logging.Logger use of the detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.