Log4cpp in auction Angus Chen March 9, 2007
Why and when writing logs <ul><li>debug message. </li></ul><ul><li>error handle. </li></ul><ul><li>system monitor. </li></ul>
History <ul><li>v1. cerr, cout to standard output or error, or directly open and write into file </li></ul><ul><li>v2. YAX...
log4cpp concept <ul><li>logger a.b.c.d.e=>logger category. </li></ul><ul><li>log appender=> output log writer. </li></ul><...
Usage <ul><li>step1.  </li></ul><ul><li>#include <auctions/log/yapLogcpp.h> </li></ul><ul><li>class xxx{ </li></ul><ul><li...
Writing a testcase <ul><li>void setUp(){  Yahoo::Taiwan::Auction::yapLogcpp::test(); </li></ul><ul><li>} </li></ul>
Configuration <ul><li>default show message > debug level. </li></ul><ul><li>else read all files in /home/y/conf/yap_logcpp...
Q&A
Upcoming SlideShare
Loading in...5
×

Log4cpp - Updated - to verify modify updates

453
-1

Published on

This is a help file of log4cpp

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
453
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Log4cpp - Updated - to verify modify updates

  1. 1. Log4cpp in auction Angus Chen March 9, 2007
  2. 2. Why and when writing logs <ul><li>debug message. </li></ul><ul><li>error handle. </li></ul><ul><li>system monitor. </li></ul>
  3. 3. History <ul><li>v1. cerr, cout to standard output or error, or directly open and write into file </li></ul><ul><li>v2. YAX_YLOG, define DEBUG level. </li></ul><ul><li>v3. log4cpp, full configurable. </li></ul>
  4. 4. log4cpp concept <ul><li>logger a.b.c.d.e=>logger category. </li></ul><ul><li>log appender=> output log writer. </li></ul><ul><li>use configuration file to define which logger uses which kind of appender. </li></ul>
  5. 5. Usage <ul><li>step1. </li></ul><ul><li>#include <auctions/log/yapLogcpp.h> </li></ul><ul><li>class xxx{ </li></ul><ul><li>static LoggerPtr logger; </li></ul><ul><li>} </li></ul><ul><li>step2. </li></ul><ul><li>LoggerPtr xxx::logger=getLogger(&quot;myauc.UserWatchingBO&quot;); </li></ul><ul><li>step3. </li></ul><ul><li>if(DEBUG_ENABLE){ </li></ul><ul><li>logdebug(logger)<< &quot;from is &quot;<<from; </li></ul><ul><li>} </li></ul>
  6. 6. Writing a testcase <ul><li>void setUp(){ Yahoo::Taiwan::Auction::yapLogcpp::test(); </li></ul><ul><li>} </li></ul>
  7. 7. Configuration <ul><li>default show message > debug level. </li></ul><ul><li>else read all files in /home/y/conf/yap_logcpp/ </li></ul><ul><li>log file and reference http://twiki.corp.yahoo.com/view/Devel/log4cpp_y </li></ul>
  8. 8. Q&A
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×