From: Kevin G. <ke...@go...> - 2003-01-16 04:56:01
|
Ahh, I feel clarity approaching. I think I've got the best of our approaches coming on. Collaboration rocks. - input_filter as a property of an appender in the config, normally is not defined, but can be defined and false or set to...what? a coderef? Would need to implement set_input_filter method in Appender.pm. - I was suffering confusion hacking the Layouts to return arrayrefs untouched, silly. The log4j behavior is to have a sql statement like this insert into LogTable (Thread, Class, Message) values ("%t", "%c", "%m") passed to PatternLayout. We still support that, log4j configs will run just fine as-is. My new behavior with the bind values doesn't need PatternLayout at that level, it needs a NoopLayout to just pass the array back, that's not log4j but that's ok, it's consistently not log4j. - thanks for noticing the join in the noop coderef - I'm still not sure how this will interact with jcromie are talking about, but it's more than I can keep in my head at one time. Check out the attached patch and let me know what you think! Mike Schilli wrote: > > ke...@go... wrote: > > > Are you guaranteeing that no Log::Dispatch::* class will ever have a > > subroutine called "input_filter"? > > Well, admittedly, that's somewhat sloppy right now. Although, long term > we need a more generalized appender interface anyway -- but we can't > finalize that right now, because we don't know yet which crazy ideas > we're gonna come up with in the future ;). > > > And why call a method *all* the time when *most* of the time we're > > just doing a join? > > Good point. It's clearly unnecessary to call input_filter() every time. > That could be changed to cache the default behaviour (join) and do it in > Log::Log4perl::Appender. > > > How about something like this instead. Munging the message should be > > a function of the Layout class, shouldn't it? > > Hmm, really? Isn't it up to the appender to decide which format it > likes/needs? Shouldn't it be a property of the appender? > > > If need be, I might have time tonight to generate a patch for > > discussion purposes. > > Good idea -- think that would help clear things up. > > -- > -- Mike > > Mike Schilli > log...@pe... -- Happy Trails. . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510)525-5217 |