Log4J 输出信息中数字的意思是什么??
「已注销」 2016-05-18 12:28:34 ]测试代码:
public class Log4JTest {
//create a logger by the name of class Log4JTest.
private static Logger logger = Logger.getLogger(Log4JTest.class);
public static void main(String[] args) {
//Use the default configuration.自动快速地使用缺省Log4j环境
BasicConfigurator.configure();
//读取使用Java的特性文件编写的配置文件。
//PropertyConfigurator.configure("log4j.properties");
// 记录debug级别的信息
logger.debug("This is debug message.");
// 记录info级别的信息
logger.info("This is info message.");
logger.warn("This is a warning.");
// 记录error级别的信息
logger.error("This is error message.");
logger.fatal("This is a fatal error.");
}
}
输出信息:
0 [main] DEBUG Log4JTest - This is debug message.
2 [main] INFO Log4JTest - This is info message.
2 [main] WARN Log4JTest - This is a warning.
2 [main] ERROR Log4JTest - This is error message.
2 [main] FATAL Log4JTest - This is a fatal error.
请问 输出信息中的数字是什么意思????