2008/9/5 MaenXe <[EMAIL PROTECTED]>: > > Well, I thought this was what I needed, but after examining the logs, this > isn't gonna do. For one, it puts the entire payload of the message into the > log P-(, basically what I'm looking for is something similar to the apache > logs, or a mail log. I need producer/consumer ID, queue/topic, msg ID, and > timestamp. I don't imagine this would be hard, but I'm surprised that it > doesn't seem to be implemented already. > > Is there a way to modify the data logged by the interceptor to trim out > excess junk? > Is there a way I can tweak log4j to get this? > > The purpose of this is that we want to refer to logs to follow the path of a > message for troubleshooting.
FWIW log4j typically only lets you turn on or off logs - or reformat how the log information is formatted (things like thread, time, logger and so forth); but it ultimately doesn't let you modify the text that is logged. How about you try modifying the LoggingInterceptor to do exactly what you want - so it can be configured to turn on or off the message payload being logged? We love patches and contributions! http://activemq.apache.org/contributing.html BTW you might find the Camel Tracer interesting; it kinda does the same thing you're trying to do - but at the Camel endpoint layer rather than the JMS broker layer... http://activemq.apache.org/camel/tracer.html in particularly its highly configurable so you can turn on and off different items to be logged. If it helps, here's the Camel TraceInterceptor http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java?view=markup and the TraceFormatter that configures the formatting of the trace message http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java?view=markup -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com