Thanks Claus, that worked great!!!
Here's what I ended up with, the latter method lifted from
*/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java*.
Thanks, Steve
/**
* Dump all Camel routes for the specified CamelContext as a string.
*
* @param context
* @return
* @throws Exception
*
* @see
http://camel.465427.n5.nabble.com/Logging-Camel-route-info-tt5768807.html
*/
public static String dumpRoutes(CamelContext context) throws Exception {
assert(context != null) : "dumpRoutes(): ERROR: CamelContext object
is null";
return ((ModelCamelContext)
context).getRouteDefinitions().toString();
}
/**
* Dump all Camel routes for the specified CamelContext as XML document.
*
* @param context
* @return
* @throws Exception
*
* @see
http://camel.465427.n5.nabble.com/Logging-Camel-route-info-tt5768807.html
*/
public static String dumpRoutesAsXml(CamelContext context) throws
Exception {
assert(context != null) : "dumpRoutesAsXml(): ERROR: CamelContext
object is null";
List<RouteDefinition> routes =((ModelCamelContext)
context).getRouteDefinitions();
if(routes.isEmpty()) {
return null;
}
RoutesDefinition def = new RoutesDefinition();
def.setRoutes(routes);
return ModelHelper.dumpModelAsXml(def);
}
--
View this message in context:
http://camel.465427.n5.nabble.com/Logging-Camel-route-info-tp5768807p5768826.html
Sent from the Camel - Users mailing list archive at Nabble.com.