Hi You can get the route information from camel context. There is a get routes definitions which can output the route model as xml. Or if you want that compressed tostring then its on the getRoutes intead.
On Thu, Jul 2, 2015 at 3:41 PM, SteveR <srichard...@vonage.com> wrote: > I have a linux Java7 stand-alone application using Camel 2.14. In my Camel > *rootLog.txt* file with DEBUG enabled, I see that Camel prints a nice > succinct one-liner showing the details associated with a given route. > > Can anyone point me to the Camel core java code that generates these kind of > trace prints? I'm assuming that it's some chain of DSL methods that are > employed to produce this kind of route info. I'd like to use a similar > approach to incorporate these kind of trace prints in my application code, > since the Camel *rootLog.txt* will typically not be set to DEBUG level in > production. > > For example: > > *[2015-07-01 21:04:56,976] DEBUG [main] Route: ROUTE_ID_RAW_MCQEVENTS >>> > EventDrivenConsumerRoute[Endpoint[udp://dv-09.dev.s.mission.net:2050] -> > Pipeline[[Channel[setProperty(CamelCharsetName, iso-8859-1)], > Channel[Threads[[Choice[[When[{bean{MCQ_FILTER_BEAN_ROUTE_ID_RAW_MCQEVENTS, > method=isAuthorized}} -> > [To[log:com.mission.mplr.multiprotocollistenerrouter.BACKUP_FILE1?level=INFO], > To[log:com.mission.mplr.multiprotocollistenerrouter.THROUGHPUT_FILE1?level=INFO&groupInterval=30000&groupDelay=1000&groupActiveOnly=false], > To[netty:udp://dv.dev.s.mission.net:62268?clientPipelineFactory=#MCQ_CLIENT_PIPELINE_FACTORY_ROUTE_ID_RAW_MCQEVENTS&sync=false&sendBufferSize=4194304&allowDefaultCodec=false&disconnectOnNoReply=false], > To[seda:SEDA_300], SetProperty[CamelCharsetName, {iso-8859-1}]]]] > Otherwise[[To[log:MCQ_NOT_AUTHORIZED_LOGGER?level=ERROR], Stop]]]]]]]]]* > > Thanks, SteveR > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Logging-Camel-route-info-tp5768807.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/