You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by OrackBahama <jd...@metadok.de> on 2013/07/02 13:09:58 UTC
logging to different (dynamic) appenders
Hi,
I would like to define the name of a logger in a camel header variable.
Unfortunately this doesn't seem to work. Example:
.from(...)
.log( LoggingLevel.INFO, "mylogger", "MyMessage )
.to(...)
is working as expected, whereas
.from(...)
.setHeader( "logger", constant("mylogger"))
.log( LoggingLevel.INFO, "${header.logger}", "MyMessage )
.to(...)
is not !
Isn't that possible or do I understand something wrong ? Workarounds
available ?
Thanks for help in advance.
--
View this message in context: http://camel.465427.n5.nabble.com/logging-to-different-dynamic-appenders-tp5735080.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: logging to different (dynamic) appenders
Posted by gquintana <ge...@gmail.com>.
You could use the DynamicRouter EIP + dynamically built Log endpoints.
--
View this message in context: http://camel.465427.n5.nabble.com/logging-to-different-dynamic-appenders-tp5735080p5735159.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: logging to different (dynamic) appenders
Posted by aedwards <ad...@middleware360.com>.
A cleaner approach might be to use something like the sifting appender from
logback to send the logs to different files (or whatever your requirement
is) based on MDC variables that Camel sets.
http://logback.qos.ch/manual/appenders.html#SiftingAppender
http://camel.apache.org/mdc-logging.html
--
View this message in context: http://camel.465427.n5.nabble.com/logging-to-different-dynamic-appenders-tp5735080p5735157.html
Sent from the Camel - Users mailing list archive at Nabble.com.