Hi, I'm trying to extend RollingFileAppender. I want to manipulate the *complete* message that's logged by prepending something to the message just before it's dumped into the file.
My custom class's append() tries to create a new LoggingEvent from the given LoggingEvent, prepending my text to the event.getRenderedMessage(), then calls super.append(myNewLoggingEvent). Unfortunately, getRenderedMessage just returns the original message I wanted logged, not the full message rendered with my ConversionPattern. My ConversionPattern is set to this, btw: %d %5p [%t][%40C::%-20M(%3L)]-%m%n Said another way, I want this: logger.debug("my message"); to get rendered and written to file like this: <my custom text> 2007-03-22 19:05:05,615 DEBUG [main][com.xxxxxx.TestMain::<init> ( 26)]-my message Is there a way to make this happen? I can't seem to get my hands on the full, rendered message ("2007-03-22 19:05:05,615 DEBUG [main][com.xxxxxx.TestMain::<init> ( 26)]-my message") so I can prepend "<my custom text>". I've tried creating an ObjectRenderer, too, but I don't think that's the way I should go (is it?). If I could grab the full rendered message and prepend my String and then *reset* the rendered message I think I'd be fine, but I'm not sure... FWIW, I'm using 1.2.14. Thanks! Bret --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]