如何实现/使用log4j? [英] How to implement/use log4j?
问题描述
我很快将使用Java的log4j类,为项目创建日志。
但我不认为我知道或对此有任何想法。
希望有人为此启发我,但是,琐碎的问题。
I am soon going to use log4j class using Java, for a project, to create logs. But i dont think i know or have any slightest idea about it. Hope someone enlightens me over this, but, trivial issue.
推荐答案
Log4j基本上会接受你要输出的任何语句,允许您为其分配严重性级别(警告,错误,严重等)并以各种方式将其记录下来。 (对于文件,字节流等,有很多可用的appender选项。);
Log4j basically takes any statement you want to output, lets you assign a "severity" level to it (warning, error, critical, etc) and logs it out in a variety of ways. (to a file, to a byte stream, etc. there are lots of appender options available.);
这是对log4j的简短介绍。
http://www.developer.com/open/article.php/3097221/Logging-with-log4jmdashAn-Efficient-Way-to-Log-Java-Applications.htm
Here's a short blurb introduction to log4j.
http://www.developer.com/open/article.php/3097221/Logging-with-log4jmdashAn-Efficient-Way-to-Log-Java-Applications.htm
这是一个简短的教程:
http://veerasundar.com/blog/2009/07/log4j-tutorial-adding-log4j-logging-to-your-project/
Here's a short tutorial:
http://veerasundar.com/blog/2009/07/log4j-tutorial-adding-log4j-logging-to-your-project/
这篇关于如何实现/使用log4j?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!