Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.15.3
-
None
-
Unknown
Description
The enableTrace() method of the Camel Main class doesn't work.
When we setup the code as such
public static void main(String... args) throws Exception { Main main = new Main(); main.enableHangupSupport(); main.addRouteBuilder(new MyRouteBuilder()); main.enableTrace(); main.run(args);
and launch the Main class, than the messages reported by the route in the log are not traced at all.
If we debug, we can see that there is not CamelContext object when this method of the MainSupport class is called
public void enableTrace() { this.trace = true; for (CamelContext context : camelContexts) { // EMPTY context.setTracing(true); } }
The workaround is to enable the tracing within the route definition
public void configure() { getContext().setTracing(true);