General Aspects
Understand what the purpose of logging is;
Understand the advantages of using a logging framework vs. ad-hoc code (i.e. System.out.println):
- Configure at runtime;
- Ability to specify the layout in which the information will be saved;
- Ability to specify the destination where the information will be saved;
Initialization
Correctly configure log4j using JVM arguments.
Enable/disable log4j debugging.
Configuration
Understand the concepts of Logger (including the root logger), Appender, Level, Layout;
Understand the concept of appender additivity;
Configure log4j at runtime using property files;
Configure log4j at compile time using the BasicConfigurator;
Correctly use the following parameters for org.apache.log4j.PatternLayout : %p, %m, %n, %d ( without any extra modifiers);
Correctly use the following appenders:
- org.apache.log4j.ConsoleAppender
- org.apache.log4j.RollingFileAppender;
Common Usage
Correctly obtain a logger for a given artifact ( class, package )
Correctly use the Logger.log methods, and the shorthand methods Logger.trace, Logger.debug, Logger.info, Logger.warn, Logger.error, Logger.fatal
Understand the hierarchy of the levels ( i.e. trace has lower priority than debug which has lower priority than info etc)
Performance Aspects
Use the isXXXEnabled() family of methods and the isEnabledFor(level) method correctly
Recognize which layout options incur a significant increase in execution time of the logging operation compared to the %p, %m, %n, %d options. Do not take into account optimisations of the %d option
Recognize which appenders incur a significant increase in execution time of the logging operation compared to the org.apache.log4j.RollingFileAppender.
分享到:
相关推荐
文件上传程序
4.风格一致的 解任意初等函数方程(组),复数运算,积分, 最小二乘和线形回归分析,任意一阶微分方程 等许多附加功能. 5.界面设定自动保存功能. 6.图形,...
4.可以添加新闻标题链接到其他网页的新闻。 5.可编辑新闻; 6.可由自已的网站发布免费的新闻代码; 7.用户直接通过管理界面管理网站公告(DEMO at http://www.jdinfo.net); 8.用户直接通过管理界面管理网站随机广告...
数据通信与计算机网 第 3 章 数据链路层.ppt
将HTML标签外的空格替换为
南京工程学院C语言课程设计 题目:学生成绩管理系统 姓名: __ 学号
Photoshop 第四部分 利用画笔工具绘制一幅风景图画
搜索引擎联邦算法设计与系统实现Algorithm Design and System.ppt
MATLBA程序设计教程 第11章 MATLAB图形用户界面设计.ppt
汇编语言程序设计实验报告二(分支循环程序实验) 1下载文档.doc
一个文字特效........
论本土资源与法治的矛盾冲突 - - --兼谈法治的渊源与理念.docx
05级选题方向说明 医学信息教研室: 一、教务管理系统的优化处理 研究
Tasm 5.0 安装文件 Borland
kpc卡通图片管理
1,动态Dhtml效果 2,自动保留100条纪录 3,版面风格自定义 4,标题自动切割,保持界面美观
台湾BANCHE的新闻更新程序,BIG5码。