Analysis of SmartCloud entry logs

Source: Internet
Author: User
Keywords Smartcloud entry

This article mainly introduces the IBM http://www.aliyun.com/zixun/aggregation/13696.html ">smartcloud Entry log, including the use of the log frame, log structure and log analysis, Help the user in the process of using SmartCloud Entry in the case of problems, fast positioning.

There are a lot of popular log frameworks, such as log4j, SLF4J, Apache common-logging, and so on, each framework is used and configured in a different way, in SmartCloud Entry, we use the JDK's own log tool to form the system's log.

We get a named Logger by Java.util.logging.Logger.getLogger (String name), and then we can call our respective methods to output the log separately.

The level of the log is progressively off, SEVERE, WARNING, INFO, FINE, Finer, FINEST, and all, and as the level increases, so does the log information.

Listing 1. How to output a log

Import java.util.logging.Logger Logger Logger = Logger.getlogger ("Wpf-test"); Logger.fine ("This are a fine message");

Log configuration

Smarycloud Entry The default log configuration is provided through the configuration file Log.properies is located in the installed configuration directory, and the default configuration is as follows:

Listing 2. Log default configuration

# This are the main logging.properties for the CFS API creator Handlers=java.util.logging.consolehandler, Java.util.logging.FileHandler # Default Global logging level. . Level=fine # Default Global logging level for the console handler. Java.util.logging.consolehandler.level=info java.util.logging.consolehandler.formatter= Java.util.logging.SimpleFormatter Java.util.logging.filehandler.pattern=%h/.skc/logs/skc-%g.log Java.util.logging.filehandler.count=9 java.util.logging.filehandler.limit=50000000 Java.util.logging.filehandler.append=true

The default log level is FINE, but if we need to analyze some of the issues, often need to provide more detailed log, you can adjust the output to the log level of the file to achieve the following methods:

java.util.logging.filehandler.level=finest

From other configuration items, we can see that the system defaults to store the log in the user directory under the/.skc/logs, while each log file maximum of 50M, up to 9 log files, log files are named by the combination of SKC and numbers, Skc-0.log for the latest log files, such as

Figure 1. Log file List

Related Article

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.