log4j 入门
来源:互联网 发布:山灵m2知乎 编辑:程序博客网 时间:2024/04/28 06:49
入门:
log4j download path : http://mirror.bit.edu.cn/apache/logging/log4j/1.2.16/apache-log4j-1.2.16.zip
a helloworld exmple:
import org.apache.log4j.BasicConfigurator;import org.apache.log4j.Level;import org.apache.log4j.Logger; public class TestLog4J { public static void main(String[] args) { // create a log for TestLog4J class Logger logger = Logger.getLogger(TestLog4J.class); // use the default config BasicConfigurator.configure(); // set this log level ,it will hide if it's output level lower this level logger.setLevel(Level.ALL); logger.debug("this is debug"); logger.info("this is info"); logger.error("this is a error"); logger.fatal("this is a fatal error"); } }
延伸阅读:
http://www.hudong.com/wiki/log4j
http://www.cnblogs.com/flurry/archive/2010/02/25/1673549.html
- Log4j入门
- Log4j入门
- log4j入门
- log4j入门
- Log4j入门
- LOG4J 入门
- Log4J入门
- LOG4J 入门
- log4j 入门
- Log4j入门
- Log4J 入门
- log4j 入门
- log4j入门
- Log4j入门
- log4j入门
- log4j入门
- Log4j入门
- Log4j最简入门
- 字典树 poj 2001
- 查看Linux系统位数命令
- TCP/IP数据传输过程
- win7 下cmd运行sqlplus报错以下错误。SP2-1503: 无法初始化Oracle 调用界面,SP2-1503: 无法初始化Oracle 调SP2-0152
- 错误expected unqualified-id before string constant
- log4j 入门
- 如何删除系统管理员的账户
- Foreach用法
- 数据结构排序之总结2
- 关于做Android+J2ee系统集成开发的一点心得
- 解决办法: 无法与DataSourceID 为“Adventure Works DW” 名称为“Adventure Works DW”的数据源建立连接
- 或许被我们遗忘的JAVA Math类
- struts1 一个很简单的登录演示
- Android四种Activity的加载模式