camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Dywicki <l...@code-house.org>
Subject Re: Logging from route not working
Date Mon, 30 Apr 2012 07:26:29 GMT

Use .log(priority, category, message). In your case .log(priority, message) goes to category
named as route id. If you have no id set on route it will be generated.

Regards,
Lukasz


Wiadomość napisana przez Claus Ibsen w dniu 30 kwi 2012, o godz. 08:18:

> Its the name such as you define with this code
> 
>   Logger log =
> LoggerFactory.getLogger(SampleRouteBuilder.class.getName());
> 
> Where the name of the logger is this
> SampleRouteBuilder.class.getName()
> 
> So if you want to use the same name, then you need to use the above
> name in the Camel log in the DSL.
> 
> 
> 
> On Mon, Apr 30, 2012 at 7:18 AM, Nestor Urquiza
> <nestor.urquiza@gmail.com> wrote:
>> I am not sure I understand what logName refers to: The final log stream, the
>> appender, the category?
>> 
>> Here is my log4j.properties relevant section:
>> 
>> log4j.rootLogger=WARN, logfile
>> log4j.appender.logfile=org.apache.log4j.RollingFileAppender
>> log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
>> log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] -
>> %X{remoteAddress} %X{sessionId} %m%n
>> log4j.appender.logfile.File=${catalina.home}/logs/nestorurquiza-app.log
>> log4j.appender.logfile.MaxFileSize=200MB
>> log4j.appender.logfile.MaxBackupIndex=3
>> log4j.logger.com.nestorurquiza.orchestration.camel.route=DEBUG
>> 
>> As per your suggestion I used:
>> from("direct:start").log(LoggingLevel.DEBUG, "logfile", "Processing ${id}");
>> and
>> from("direct:start").log(LoggingLevel.DEBUG,
>> "com.nestorurquiza.orchestration.camel.route", "Processing ${id}");
>> 
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Logging-from-route-not-working-tp5674964p5675092.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/


Mime
View raw message