From: Kevin G. <ke...@go...> - 2002-12-27 00:12:27
|
All right, I've finally come up with a good synthesis of the (deprecated) JDBCAppender and Log::Dispatch::DBI. It's checked in, it's very flexible, and I'm pretty happy with the API. Any suggestions are more than welcome. I matched the JDBCAppender pretty closely, a config file for that should work with this, and it can use the same behavior of filling up the log statements in a buffer and writing them out when bufferSize is reached, but it can use other behaviors as well. This also has additional features, like placeholders and bind values, though, which are much more secure and highly recommended. I tried to make some allowance for performance efficiency as well. I had to completely rewrite Log::Dispatch::DBI, creating a log4perl-specific version. I put it under Log::Log4perl::Appender::DBI, but I'm not sure if that's right, since it's *actually* a subclass of Appender.pm. Any comments on that? Working with log4j's PatternLayout I also found that while we had log4perl dying if no ConversionPattern was specified, they defaulted to %m%n, so I changed to match that. Already checked in, attached is a diff for your convenience (may not work as a patch, haven't tried). Anybody's comments are welcome! -- Happy Trails . . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510) 525-5217 |