We just upgraded to log4j2. We are logging via slf4j. Given: onException(AccountNotFoundException.class).log(LoggingLevel.WARN, "com.foo.server.ngw", "Account not found");
We see in the Tomcat log: 2015-01-16 10:45:07,357 WARN [http-bio-8080-exec-1] org.apache.camel.util.CamelLogger (CamelLogger.java:182) - Account not found Not sure what that tells you quite frankly. We did previously use log() handing in our own org.slf4j.Logger without further success. On 16 January 2015 at 06:30, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > Kinda weird as that log name refers to the slf4j marker which you can > also use. Are you sure the log() method you use, its the logger name > and not some marker parameter? > > Also you do not use any custom logger instance, as if so then that is > used over what you specify in the log method,. > > https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java#L55 > > > On Tue, Jan 13, 2015 at 11:17 AM, James Green <james.mk.gr...@gmail.com> > wrote: > > The following code: > > > > .log(LoggingLevel.ERROR, "com.foo.server.ngw.router", > > "Account Not Found. Message discarded.").stop(); > > > > Results in the following in the log: > > > > 10:12:11,690 ERROR org.slf4j.helpers.MarkerIgnoringBase:145 error() - > > Account Not Found. Message discarded. > > > > I was expecting to see com.foo.server.ngw.router somewhere above? Not > sure > > what else it is supplied for..? > > > > James > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: cib...@redhat.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > hawtio: http://hawt.io/ > fabric8: http://fabric8.io/ >