From: Roger Y. <rog...@ey...> - 2004-12-16 20:18:49
|
Kevin, I've attached a copy of the CompressedFile appender module that I've written based on your recommendation below. Please let me know if I've missed anything. As for the change to the Log::Log4perl::Config module, here is the diff -u: $ diff -u Log-Log4perl-Conf* --- Log-Log4perl-Config-ry.pm 2004-12-03 11:35:27.258550400 -0500 +++ Log-Log4perl-Config.pm 2004-12-03 11:28:14.626456000 -0500 @@ -461,8 +461,6 @@ } } - $layout_class = ($layout_class !~ /::/) ? "Log::Log4perl::Layout::$layout_class" : $layout_class; - eval "require $layout_class" or die "Require to $layout_class failed ($!)"; This ensures that regardless if the module is available or not, we have the full package name for the layout. Yes, the change I made to the util module essentially disabled the function. Roger Yager -----Original Message----- From: Kevin M. Goess [mailto:ke...@go...] Sent: Monday, December 13, 2004 1:49 AM To: rog...@ey... Cc: log...@li... Subject: Re: [log4perl-devel] File compression and compiling Roger, thanks for your submission, sorry for the late response, it's been a busy week for me, and I suspect Mike Schilli is out of town. A small point, diff -u is somewhat more traditional and easy to read than diff -c. > Also, I have included file compression (using IO::Zlib) into the > Log::Log4perl::Appender::file (see diff below). An interesting idea. It looks to me like this changes the semantics of Appender::File to the point where it would be better off in its own appender class, like Appender::CompressedFile. It clashes with "pipe", which you handle, as well as with "autoflush", which you don't. And I wonder about the reliability/performance if the IO::Zlib uses the external gzip option. > . Modified Log::Log4perl::Config to handle abbreviated layout > names outside of the call to Log::Log4perl::Util::module_available (see > diff below). I see from your diff where you took it out, but where did you put it back in? > . Modified Log::Log4perl::Util::module_available to always > return true (see diff below). Which disables the function, correct? Mike, shouldn't the module_available check %INC first, in which case it doesn't have to try to load the module at all? -- Happy Trails . . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510) 525-5217 |