camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Meifang Shen (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-5592) Logger Level is always at default level("ERROR") when error handler is LoggingErrorHandler
Date Wed, 12 Sep 2012 08:44:08 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-5592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453834#comment-13453834
] 

Meifang Shen edited comment on CAMEL-5592 at 9/12/12 7:42 PM:
--------------------------------------------------------------

Please see the configuration of the logger error handler:
{noformat} 
routeBuilder = new org.apache.camel.builder.RouteBuilder() {
	public void configure() throws Exception {
		errorHandler(loggingErrorHandler().logName(
				"TestLoggingErrorHandler").level(
				org.apache.camel.LoggingLevel.ERROR));
		from(uriMap.get("Sender_cMessagingEndpoint_1"))
				.routeId("Sender_cMessagingEndpoint_1")
				.process(new org.apache.camel.Processor() {
					public void process(org.apache.camel.Exchange exchange) throws Exception {
						throw new java.lang.Exception("This is specially generated java.lang.Exception exception");
					}

				}).id("cProcessor_1");
	}
};
getCamelContexts().get(0).addRoutes(routeBuilder);
{noformat} 

BTW, about the urimap, please see below code.

protected void initUriMap() {
	uriMap = new java.util.HashMap<String, String>();
	uriMap.put("Sender_cMessagingEndpoint_1", "timer:myTimer?repeatCount=1");
}

                
      was (Author: mfshen):
    Please see the configuration of the logger error handler:
{noformat} 
routeBuilder = new org.apache.camel.builder.RouteBuilder() {
	public void configure() throws Exception {
		errorHandler(loggingErrorHandler().logName(
				"TestLoggingErrorHandler").level(
				org.apache.camel.LoggingLevel.ERROR));
		from(uriMap.get("Sender_cMessagingEndpoint_1"))
				.routeId("Sender_cMessagingEndpoint_1")
				.process(new org.apache.camel.Processor() {
					public void process(org.apache.camel.Exchange exchange) throws Exception {
						throw new java.lang.Exception("This is specially generated java.lang.Exception exception");
					}

				}).id("cProcessor_1");
	}
};
getCamelContexts().get(0).addRoutes(routeBuilder);
{noformat} 
                  
> Logger Level is always at default level("ERROR") when error handler is LoggingErrorHandler
> ------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5592
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5592
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.3
>            Reporter: Meifang Shen
>
> when logger level is set to other level (WARN, DEBUG or INFO) except for ERROR, but actually
the log is always at ERROR level (it's the default level).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message