Log4j是帮助开发人员进行日志输出管理的API类库。它最重要的特点就可以配置文件灵活的设置日志信息的优先级、日志信息的输出目的地以及日志信息的输出格式。Log4j除了可以记录程序运行日志信息外还有一重要的功能就是用来显示调试信息。很多程序员经常会使用System.out.println语句输出某个变量值的方法进行调试。这样会带来一个非常麻烦的问题:一旦哪天程序员决定不要显示这些System.out.println的东西了就只能一行行的把这些语句注释掉。若哪天又需调试变量值,则只能再 一行行去掉这些注释恢复System.out.println语句。使用log4j可以很好的处理类似情况:使用"DEBUG"等级输出会类似System.out.println,开发后期不需要输出调试时可以把等级根据需要调高,如调到"ERROR"等级,只有出错错误时才输出。
在apache网站:jakarta.apache.org/log4j可以免费下载到Log4j最新版本的软件包。
使用步骤分为3步:
目录结构如下:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVEAAAClCAIAAABqYFmuAAAeM0lEQVR4nO2dW3Ac1ZnH+4Xax9VDqhKqssXd64pr4wuSYybE4SUIkqplNxXAcnBwCPTG2SQY7ybY2MKSbYwQJnSMZJmAhR2wGRsmK2w8lgBj5FjGgDGywYOiKVuSJesyN41G1qjnevahe7rP6T6npzXTc//+9ZWq+8y5dWt+/Z1zuvsbDlmhqx/vPf3Md3G7+vFeS2oGgUAZa9VvNx79fPRDV+D8OFKMK3SvQCBQrgTMg0CVJWAeBKosAfMgUGWpKJif/8iuPLcIAlWsgHkQqLKUJ+bPOzYopv+0lJh3CzbOJrgL3Q0QKFPlg/netzeQu+s1GXLDvFuwcbzTqppSoAPzoBJXDplvbXyutfG51sam6ER7dKI9PLDLd/754e76fxx+orWxCSF039MHpZwM5jOAFi9iFfNuwWazAeigclG2zJ84caKpqYn60XMbX3jmz2fQ1Em6YagXM/NuwWYT3E4emAeVibJi/vjx4wsWLJg3bx4rw7onXkLeI3RD6K2TX89/ZNf8R3a99t55fVmeS0mmzclrEuRBtyTeiWXgbIKbzjyWh/hQSbcJAk80YBPcCKnMWzdjAIEKosyZl4BfsWKFAfO/+q+X0dU3m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Z4blJ8YZ5DWBEg4L9/QGLSpuRD/ITDvEpUDvcrSd9LocsrtLIU8fOdP8ocOhWyzU9I3tRfWeXj9dxgccWuevu/ow86ftlQ56/ISkNujDILUV1pHiF1jsbKWqS43t1X+JUkXpMZ/Wz+eGeVqIO3mXDGKjUJaFn0/7OxxEb/VVmol+Z1bpp7UYU9L3GKPddVLj7rFqKbMDGdi2NtpCNr70xSBBKi2VxB2rnnnGDJo8FpoDpp0fRq805VJjeuICQ+5TWknPPHUmhTEvX6CUKkqJea/Xa2Y+//vmjvHJcEv7UWkkPzkTq1q0MjgTU1IyGdtTIurRY9dlOLZXb7PRbrjR0siGyPGGmeh3ZmU8n0/t4tC3qd9KZYRPGdtr0SSb855sU77H3pMntbMH/GNsR4MsxRG6TqZcNOYa9d4YMaFS8jN6RZwrcnlOWrsjToJ2X98rxpHqhzbYaIEY26fSlU6VEvMm1+23vfr+8bN9vlDEPx3xT0dTFvFPR3yhyFXvZFZrePjtcVrsOhPMa8cFqejxWERpIvad9oqgnSfomTcT/c6sNPfnlfGmZkxLQU2XzWANj2iOXEhLze6JcsoUgFKb3FGHg1zk0i+BaQtrjkXOorpwbX76whox3tdBr19ZxJuntGJ0pNrxETYVKYc1PPP35/cd+ayzu/vK2OWvh8YuDPouDPrODwTOD/hcQ2PDYwOd3d3se3VzlPF9ufyHhy1cQNq832HLYYPWVl2oe4/lcK9OkslncnYf7IqHvghPXgj6XEGfK+DtC/pd4eCFeOiL3Qe72M/kpJVbsBEDgTTIV9Cjt7obxLlVTlGy9ljyfGZkVRbzCKFTvQNP7jzc0Hakcffhxt2HG3e/07j7cEPbkSd3Hs4CeIQQMTBn8iWPz/PocvPfYoFVuEd3SkQVxzwIVOEC5kGgylJZMQ8GBmbGWBCVGPMgEChLAfMgUGWJyvz/A3GGJyD0ftIvAAAAAElFTkSuQmCC" alt="" />
1. 加入log4j的jar包。
2. 在项目根目录下添加配置文件log4j.properties(可以修改第一行代码来设置等级和格式)
#设置logger级别DEBUG、INFO、WRNING、ERROR和输出格式A、B、C或D
log4j.rootLogger=DEBUG, A #输出到控制台
log4j.appender.A=org.apache.log4j.ConsoleAppender
log4j.appender.A.layout=org.apache.log4j.PatternLayout
log4j.appender.A.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%c]-[%p] %m%n #输出到E盘的log.log文件
log4j.appender.B=org.apache.log4j.FileAppender
log4j.appender.B.File=E:\\log.log
log4j.appender.B.layout=org.apache.log4j.SimpleLayout #输出到E盘的log.html文件
log4j.appender.C=org.apache.log4j.RollingFileAppender
log4j.appender.C.File=E:\\log.html
log4j.appender.C.MaxFileSize=1000KB
log4j.appender.C.MaxBackupIndex=10
log4j.appender.C.layout=org.apache.log4j.HTMLLayout log4j.appender.D=org.apache.log4j.DailyRollingFileAppender
log4j.appender.D.File=E:\\log.log
log4j.appender.D.layout=org.apache.log4j.TTCCLayout
3. 创建日志记录器来使用
package testLog4j; import org.apache.log4j.Logger; public class Test { //获取日志记录器Logger,名字为本类类名
private static Logger log = Logger.getLogger(Test.class); public static void main(String[] args) {
for(int i=0;i<10;i++){
log.debug("HellWord");
}
} }
输出结果如下:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAApUAAAD0CAIAAABFBEomAAAgAElEQVR4nO19y5XsMLJc20VftOVKHsgJmiAnVGec0Jx569pr3ljRWnSRhU9+IpEAWGRl7C4bRP6ADCDBW/j5r//+/a///v0///f//Y//+b9+A4FAIBAIXAE/JH//70AgEAgEAh8Mmr8DgUAgEAh8MoK/A4FAIBC4HoK/A4FAIBC4HoK/A4FAIBC4HoK/A4FAIBC4HoK/A9+H57b8JFi259kaXRiP9U4+/LPmwPpo7eimY6ybfwI9EPwd+D7cNLeegj2h38SJwd8yPom/cxfTHkbanIzH2q4ZxN95zJiQgY7am4n65n21jRFAn2KKuaKL2AXZjgqC7WqXJsa9dF6fWX30mnXRW9ZzWzS//Imck55UWTOVKaWqghv331JMB+VZmxsfq38kM3aQtteiGBelnRZ0ys6dunO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8JCP6Q3c3UuyCvCzoEfp/C0Cme856twmuocbY1xhl28E9MSoQyRtSWVasXb+ThRX0xqjxkw/14JH8reqMtNMzbxlR8DYgHVy+wfjbyTubI7Sp4WydJEeCc5BZgtRA1tX+8J6Rx/+rloyx9jmfhzzR9GH0qlF2FT+BuwCzD4g7InBuOP1BP/+23e6UXel91SmNPpsRwpplRRZ+0VZIEMV6kD8Jet1+v6bNGyYn2uh0/ib/1JINB1erqtjg+5OC8o4/tat68zf1FI3V1PzIXg+k3SzbM+2wtiOuH8s8H3wzJjLgqle+JdFN/XmQP6+BZz+CfRA8Hfg+3D73EqAOVG0f/TxWKkTm/sl8uBvGcHfH4Dg78D3oShM3jnLviH8nxyTA6h+7pPGsTozgJuOsW7+CfRA8Hfg+3DT3KqD4N6GDJy7717eC/6WEfz9UQj+DgQCgUDgepD4++fn5xSdAoFAIBAIyPj/8ruveGaiL+AAAAAASUVORK5CYII=" alt="" width="550" height="204" />
Log4j由三个重要的组件构成:日志信息的优先级,日志信息的输出目的地,日志信息的输出格式。日志信息的优先级从高到低有ERROR、WARN、 INFO、DEBUG,分别用来指定这条日志信息的重要程度,比如使用DEBUG,则会包括前面3个,也就是全部都包括,使用INFO,则不包括DEBUG;日志信息的输出目的地指定了日志将打印到控制台还是文件中;而输出格式则控制了日志信息的显示内容。
1. 配置log输出目的地:
org.apache.log4j.ConsoleAppender(控制台)
org.apache.log4j.FileAppender(文件)
org.apache.log4j.DailyRollingFileAppender(每天产生一个日志文件)
org.apache.log4j.RollingFileAppender(文件大小到达指定尺寸的时候产生一个新的文件)
org.apache.log4j.WriterAppender(将日志信息以流格式发送到任意指定的地方)
2. log信息的格式:
org.apache.log4j.HTMLLayout(HTML表格形式)
org.apache.log4j.SimpleLayout(简单格式的日志,只包括日志信息的级别和指定的信息字符串 ,如:DEBUG - Hello)
org.apache.log4j.TTCCLayout(日志的格式包括日志产生的时间、线程、类别等等信息)
org.apache.log4j.PatternLayout(灵活地自定义日志格式)
当使用org.apache.log4j.PatternLayout来自定义信息格式时,可以使用log4j.appender.A1.layout.ConversionPattern=%d{yyyy-MM-ddHH:mm:ss} %p-%m%n 来格式化信息
%c 输出所属类的全名,可写为 %c{Num} ,Num类名输出的范围 如:"com.sun.aaa.classB",%C{2}将使日志输出输出范围为:aaa.classB
%d 输出日志时间其格式为 可指定格式 如 %d{HH:mm:ss}等
%l 输出日志事件发生位置,包括类目名、发生线程,在代码中的行数
%n 换行符
%m 输出代码指定信息,如info(“message”),输出message
%p 输出日志的优先级,即 FATAL ,ERROR 等
%r 输出从启动到显示该条日志信息所耗费的时间(毫秒数)
%t 输出产生该日志事件的线程名