From: Mike S. <m...@pe...> - 2004-09-14 16:03:58
|
Aldrich, Timothy wrote on 9/14/2004, 8:20 AM: > ow I would like to add logging to a different file that get's > appended to during the day. This new rolling log needs different > information. It should be general status messages . i.e. program > started , ended , by whom. My question is , what is the best way to > implement this additional log ? My first thought is to write out these status messages at a higher priority (e.g. INFO), than the DEBUG messages. Typically, DEBUG messages provide low-level information about the program flow, while INFO messages carry exactly what you have in mind, things like when the program started, ended, by whom, major events, etc. If that's an option for you, leave the categories untouched (changing them is a bad idea, they determine where a message came from, not where it's going to) and just use $logger->info("Program started"); and $logger->debug("Some lowlevel info"); Then, use http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#c7fa8 to channel them into different log files. -- -- Mike Mike Schilli m...@pe... |