`
sakakokiya
  • 浏览: 485598 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
阅读更多
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.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics