Your SlideShare is downloading. ×
0
Log4cpp - Updated - to verify modify updates
Log4cpp - Updated - to verify modify updates
Log4cpp - Updated - to verify modify updates
Log4cpp - Updated - to verify modify updates
Log4cpp - Updated - to verify modify updates
Log4cpp - Updated - to verify modify updates
Log4cpp - Updated - to verify modify updates
Log4cpp - Updated - to verify modify updates
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Log4cpp - Updated - to verify modify updates

417

Published on

This is a help file of log4cpp

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
417
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Log4cpp in auction Angus Chen March 9, 2007
  • 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. 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. log4cpp concept <ul><li>logger a.b.c.d.e=&gt;logger category. </li></ul><ul><li>log appender=&gt; output log writer. </li></ul><ul><li>use configuration file to define which logger uses which kind of appender. </li></ul>
  • 5. Usage <ul><li>step1. </li></ul><ul><li>#include &lt;auctions/log/yapLogcpp.h&gt; </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(&amp;quot;myauc.UserWatchingBO&amp;quot;); </li></ul><ul><li>step3. </li></ul><ul><li>if(DEBUG_ENABLE){ </li></ul><ul><li>logdebug(logger)&lt;&lt; &amp;quot;from is &amp;quot;&lt;&lt;from; </li></ul><ul><li>} </li></ul>
  • 6. Writing a testcase <ul><li>void setUp(){ Yahoo::Taiwan::Auction::yapLogcpp::test(); </li></ul><ul><li>} </li></ul>
  • 7. Configuration <ul><li>default show message &gt; 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. Q&amp;A

×