大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。
Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
![Log4net中ConversionPattern的代码解释[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
<
layout
type
=”log4net.Layout.PatternLayout”
>
![Log4net中ConversionPattern的代码解释[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
<
param
name
=”Header”
value
=” ———————–header————————– “
/>
![Log4net中ConversionPattern的代码解释[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
<
param
name
=”Footer”
value
=”———————–footer————————– “
/>
![Log4net中ConversionPattern的代码解释[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
<
param
name
=”ConversionPattern”
value
=”%d [%t] %-5p %c [%x] %X{auth} – Line:%L %m%n”
/>
![Log4net中ConversionPattern的代码解释[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
</
layout
>
%m(message):输出的日志消息,如ILog.Debug(…)输出的一条消息
%n(new line):換行
%d(datetime):输出当前语句运行的时刻
%r(run time):输出程序从运行到执行到当前语句时消耗的毫秒数
%t(thread id):当前语句所在的线程ID
%p(priority): 日志的当前优先级别,即DEBUG、INFO、WARN…等
%c(class):当前日志对象的名称
%L:输出语句所在的行号
%F:输出语句所在的文件名
%-数字:表示该项的最小长度,如果不够,则用空格填充
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/172098.html原文链接:https://javaforall.net