From: Mike S. <m...@pe...> - 2007-11-04 02:28:08
|
From: Jonathan Swartz <sw...@po...> To: log...@li... Subject: appender/dispatcher that writes to per-category files Date: Thu, 1 Nov 2007 17:00:36 -0700 I'd like to write simultaneously to a central log file, and to a separate log file for each category. e.g. A log to category Foo.Bar would go to app.log and Foo.Bar.log. I want to do this automatically rather than having to configure each category separately. Before I set out to create this, I was curious if anyone else has done this and has advice, or if there is an existing appender/ dispatcher that does this (couldn't find anything on cpan). Seems like one of the potential problems will be reaching a maximum number of open file handles, given the large number of possible categories. So I might have to maintain a "cache" of open filehandles, closing old ones as needed when reaching a limit. Feedback appreciated. |