You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to rename certain fields in the log output. For example, instead of following
{"application_name":"roma-runtime","timestamp":"2020-05-06T13:48:16.366Z","logger":"org.apache.camel.impl.DefaultCamelContext","level":"INFO","class":"org.apache.camel.impl.DefaultCamelContext","method":"start","file":"DefaultCamelContext.java","line":3186,"thread":"http-nio-8888-exec-3","camel.contextId":"53081f9c-6d51-4f98-8c9d-439de1fcd1db","message":"Total 3 routes, of which 3 are started"}
I want camel.contextId to be renamed to integration_id. as follows
{"application_name":"roma-runtime","timestamp":"2020-05-06T13:48:16.366Z","logger":"org.apache.camel.impl.DefaultCamelContext","level":"INFO","class":"org.apache.camel.impl.DefaultCamelContext","method":"start","file":"DefaultCamelContext.java","line":3186,"thread":"http-nio-8888-exec-3","integration_id":"53081f9c-6d51-4f98-8c9d-439de1fcd1db","message":"Total 3 routes, of which 3 are started"}
Is there a way I can configure this name mapping in my logback-spring.xml file?
The text was updated successfully, but these errors were encountered:
If you need something before the next version is released, you can disable writing the MDC, and add your own custom JsonProvider that outputs the MDC using custom field names.
I am trying to plug in the encoder with a java app which uses apache camel framework. The framework already has some inbuilt MDC information as shown here -> https://people.apache.org/~dkulp/camel/mdc-logging.html
I want to rename certain fields in the log output. For example, instead of following
I want camel.contextId to be renamed to integration_id. as follows
Is there a way I can configure this name mapping in my logback-spring.xml file?
The text was updated successfully, but these errors were encountered: