log4j,logback,sl4j常用日志格式详解
2017-10-21 23:17
821 查看
%d{HH:mm:ss.SSS}: 打印日期 ------------ utputs the date of the logging event. )
%p: 打印日志级别 ------------ Outputs the level of the logging event.
%c{40}:打印日志内容 ----------- Outputs the name of the logger that published the logging event.
%C: 打印调用日志所在类名字 ----------- Outputs the fully qualified class name of the caller issuing the logging request. may impact performance
%t:打印线程----------- Outputs the name of the thread that generated the logging event.)
%m:打印log 信息 ------------- Outputs the application supplied message associated with the logging event.)
%M: 打印方法名称 ------------ Outputs the method name where the logging request was issued.
%n:换行----------Outputs the platform dependent line separator character or characters.)
%L:打印日志所在行 -------- Outputs the line number from where the logging request was issued.may impact performance)
%highlight: 指定日志信息高亮 -------- Adds ANSI colors to the result of the enclosed pattern based on the current event's logging level.
参考链接:
http://logging.apache.org/log4j/2.x/manual/layouts.html
%p: 打印日志级别 ------------ Outputs the level of the logging event.
%c{40}:打印日志内容 ----------- Outputs the name of the logger that published the logging event.
%C: 打印调用日志所在类名字 ----------- Outputs the fully qualified class name of the caller issuing the logging request. may impact performance
%t:打印线程----------- Outputs the name of the thread that generated the logging event.)
%m:打印log 信息 ------------- Outputs the application supplied message associated with the logging event.)
%M: 打印方法名称 ------------ Outputs the method name where the logging request was issued.
%n:换行----------Outputs the platform dependent line separator character or characters.)
%L:打印日志所在行 -------- Outputs the line number from where the logging request was issued.may impact performance)
%highlight: 指定日志信息高亮 -------- Adds ANSI colors to the result of the enclosed pattern based on the current event's logging level.
参考链接:
http://logging.apache.org/log4j/2.x/manual/layouts.html
相关文章推荐
- 常用日志使用方式(slf4j,logback,log4j,common-log)
- commons-loging 、log4j 、slf4j 、LogBack日志相关知识详解
- [收藏] log4j 输出日志格式PatternLayout修饰符详解
- java中常用的日志框架-logback和log4j
- 【Java】日志知识总结和常用组合配置(commons-logging,log4j,slf4j,logback)
- 用java编程方式实现logback和log4j的自定义格式日志
- 用java编程方式实现logback和log4j的自定义格式日志
- Java日志管理:Logger.getLogger()和LogFactory.getLog()的区别(详解Log4j)
- java日志组件介绍(common-logging,log4j,slf4j,logback )
- logback 常用配置详解(序)logback 简介
- logback 常用配置详解(二) <appender>
- log4j日志---通俗易懂配置详解
- RedHat系统常用的日志文件详解三
- log4j转换到logback, log4j.properties直接转换成logback.xml,logback提供了官方配置详解和转换工具
- spring中使用logback日志组件替换log4j
- logback logback.xml 常用配置详解
- logback logback.xml常用配置详解(三) <filter>
- java的几个日志框架log4j、logback、common-logging
- java日志信息 log4j配置详解
- logback 常用配置详解(三) <filter>