You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Meifang Shen (JIRA)" <ji...@apache.org> on 2012/09/12 10:48:07 UTC

[jira] [Comment Edited] (CAMEL-5593) The logger name not displayed correctly when error handler is loggingErrorHandler

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

Meifang Shen edited comment on CAMEL-5593 at 9/12/12 7:47 PM:
--------------------------------------------------------------

I think not because of the logging configuration, please see the below configuration.


{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} 

After execute this route, then the logger name is "stLoggingErrorHandler[=====]@@", just the last 30 chars.
                
      was (Author: mfshen):
    I think not because of the logging configuration, please see the below configuration.


{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} 
                  
> The logger name not displayed correctly when error handler is loggingErrorHandler
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-5593
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5593
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.3
>            Reporter: Meifang Shen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.11.0
>
>
> When input the logger name, as if it againsts the rules, no any prompt message to user.
> 1. If the length of logger name is greater than 30, then it will be only shown the last 30 substring, but lose the first several substring.
> 2. if the logger name like the following string *.*, then only show that after dot sign but lose that before dot sign.
> Sample
> if te logger name is "[===ErrorLog===]ppppppppppppp!@@", then in the log info, it is "==ErrorLog===]ppppppppppppp!@@"
> if the logger name is "ErrorLog.[===ErrorLog===]", but show the name "[===ErrorLog===]".

--
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