You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Babak Vahdat (Created) (JIRA)" <ji...@apache.org> on 2011/12/08 17:25:40 UTC

[jira] [Created] (CAMEL-4754) The onException clause should make use of the correct log (name) given by the log DSL

The onException clause should make use of the correct log (name) given by the log DSL 
--------------------------------------------------------------------------------------

                 Key: CAMEL-4754
                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.9.0
            Reporter: Babak Vahdat
            Priority: Minor


See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166230#comment-13166230 ] 

Claus Ibsen commented on CAMEL-4754:
------------------------------------

The new unit tests has a inlined processor that checks the route id is the correct value.

However fell free to submit a patch with your logging appender "trick". You must attach a file to the JIRA and mark [x] in grant license to Apache. Otherwise we cannot accept your contribution.
                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166243#comment-13166243 ] 

Babak Vahdat commented on CAMEL-4754:
-------------------------------------

But that check doesn't really work, because if you would do

{code}
assertEquals("balabala", routeId);
{code}

The test would still *pass*. The processor is O.K. the problem are those 2 catch blocks after the template.sendBody() calls. Maybe you want to give it a try with that "balabala" routeId to see what I mean.
                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Claus Ibsen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-4754:
-------------------------------

    Affects Version/s:     (was: 2.9.0)
                       2.8.3
        Fix Version/s: 2.9.0
           Issue Type: Bug  (was: Improvement)

Its a bug in the error handler when using context scoped onException.

When the routes is built, then the error handler is mixed in the routes (Camel 2.x architecture), and in this logic error handlers is build based on the given route built, and a reference is stored in the context scoped OnException. However that reference should have been keyed to the given created route. This ensures when Camel picks the OnException to handle the exception that occurred, it should pick the error handler that matches the current route. Beforehand it will pick the last created error handler from the last created route. All though the error handler reacts similar, it was only the Log DSL that uses the route id in the log process, and thus that route id was wrong, causing the Log processor to log the wrong id.

                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13165365#comment-13165365 ] 

Babak Vahdat commented on CAMEL-4754:
-------------------------------------

Maybe just as a small hint, I attached a screenshot showing the cause of the problem: the LogProcessor gets (correctly) wired with the simple expression we've on log DSL, like:

{code}
onException(Exception.class)
    .log("Error due ${exception.message}");
{code}

But with the *wrong* CamelLoggger object which is to be used for the route 'bar'. Correctly it should be wired to the CamelLogger of the route 'foo'.
                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Babak Vahdat
>            Priority: Minor
>         Attachments: debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat updated CAMEL-4754:
--------------------------------

    Attachment: CAMEL-4754-option-one.patch
    
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: CAMEL-4754-option-one.patch, CAMEL-4754-option-two.patch, debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat updated CAMEL-4754:
--------------------------------

    Attachment: debugger.jpg
    
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Babak Vahdat
>            Priority: Minor
>         Attachments: debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat updated CAMEL-4754:
--------------------------------

    Summary: The onException clause should make use of the correct logger name given through the log DSL   (was: The onException clause should make use of the correct log (name) given by the log DSL )
    
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Babak Vahdat
>            Priority: Minor
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Claus Ibsen (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-4754:
----------------------------------

    Assignee: Claus Ibsen
    
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167075#comment-13167075 ] 

Babak Vahdat edited comment on CAMEL-4754 at 12/11/11 10:29 AM:
----------------------------------------------------------------

According to my previous post on this I reopened the ticket, so that we can remedy this "false positive" effect while unit-testing.
See the two provided patches for this.
                
      was (Author: bvahdat):
    According to my previous post on this we should remedy this "false positive" effect while unit-testing, see the two provided patches for this.
                  
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: CAMEL-4754-option-one.patch, CAMEL-4754-option-two.patch, debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166019#comment-13166019 ] 

Claus Ibsen commented on CAMEL-4754:
------------------------------------

The workaround is to use route scoped onExceptions.


                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat updated CAMEL-4754:
--------------------------------

    Attachment: CAMEL-4754-option-two.patch
    
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: CAMEL-4754-option-one.patch, CAMEL-4754-option-two.patch, debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166223#comment-13166223 ] 

Babak Vahdat commented on CAMEL-4754:
-------------------------------------

@Claus,

I'm afraid that the test ContextScopedOnExceptionCorrectRouteContextTest doesn't really verify the fix, as we do swallow all the possible exceptions after the template.sendBody() call, so that using the processor DSL even if we would assert on:

{code}
assertEquals("balabala", routeId);
{code}

The tests would still pass well! as we swallow all kindes of the exceptions after the template.sendBody() calls (including a CamelExecutionException wrapping junit.framework.ComparisonFailure)

I went for another approach using a logger-name-recording-log4j-appender (see below) and removed the processor approach. If you think this would make more sense to you I would append the diff (tomorrow) into this ticket so that you can apply it into the trunk.

{code}
public class ContextScopedOnExceptionCorrectRouteContextTest extends ContextTestSupport {

    private LoggerNameRecordingAppender loggerNameRecordingAppender;

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        // append our custom log4j Appender through which we want to verify the
        // logger name of the log messages
        loggerNameRecordingAppender = new LoggerNameRecordingAppender("Error due Forced foo error", "Error due Forced bar error");
        Logger.getRootLogger().addAppender(loggerNameRecordingAppender);
    }

    @Override
    protected void tearDown() throws Exception {
        // we're done, so remove our custom Appender from the root logger
        Logger.getRootLogger().removeAppender(loggerNameRecordingAppender);

        super.tearDown();
    }

    @Override
    public boolean isUseRouteBuilder() {
        return false;
    }

    public void testContextScopedOnExceptionLogRouteBarFail() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                onException(Exception.class)
                    .log("Error due ${exception.message}");

                from("direct:start").routeId("foo")
                    .to("mock:foo")
                    .to("direct:bar")
                    .to("mock:result");

                from("direct:bar").routeId("bar")
                    .to("mock:bar")
                    .throwException(new IllegalArgumentException("Forced bar error"));
            }
        });
        context.start();

        getMockEndpoint("mock:foo").expectedMessageCount(1);
        getMockEndpoint("mock:bar").expectedMessageCount(1);
        getMockEndpoint("mock:result").expectedMessageCount(0);
        
        try {
            template.sendBody("direct:start", "Hello World");
            fail("Should have thrown exception");
        } catch (Exception e) {
            // ignore
        }

        assertMockEndpointsSatisfied();

        // assert on the logger name through which we've logged the message
        // using the log dsl
        List<String> barHits = loggerNameRecordingAppender.getRecordedLoggerNamesFor("Error due Forced bar error");
        assertEquals(1, barHits.size());
        assertEquals("bar", barHits.get(0));

        List<String> fooHits = loggerNameRecordingAppender.getRecordedLoggerNamesFor("Error due Forced foo error");
        assertEquals(0, fooHits.size());
    }

    public void testContextScopedOnExceptionLogRouteFooFail() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                onException(Exception.class)
                    .log("Error due ${exception.message}");

                from("direct:start").routeId("foo")
                    .to("mock:foo")
                    .throwException(new IllegalArgumentException("Forced foo error"))
                    .to("direct:bar")
                    .to("mock:result");

                from("direct:bar").routeId("bar")
                    .to("mock:bar");

                from("direct:killer").routeId("killer")
                    .to("mock:killer");
            }
        });
        context.start();

        getMockEndpoint("mock:foo").expectedMessageCount(1);
        getMockEndpoint("mock:bar").expectedMessageCount(0);
        getMockEndpoint("mock:result").expectedMessageCount(0);

        try {
            template.sendBody("direct:start", "Hello World");
            fail("Should have thrown exception");
        } catch (Exception e) {
            // expected
        }

        assertMockEndpointsSatisfied();

        // assert on the logger name through which we've logged the message
        // using the log dsl
        List<String> fooHits = loggerNameRecordingAppender.getRecordedLoggerNamesFor("Error due Forced foo error");
        assertEquals(1, fooHits.size());
        assertEquals("foo", fooHits.get(0));

        List<String> barHits = loggerNameRecordingAppender.getRecordedLoggerNamesFor("Error due Forced bar error");
        assertEquals(0, barHits.size());
    }

    private static class LoggerNameRecordingAppender extends AppenderSkeleton {

        private final List<String> recordedLogMessages;
        private final Map<String, List<String>> recordedLoggerNames;

        LoggerNameRecordingAppender(String... logMessages) {
            this.recordedLogMessages = new ArrayList<String>(Arrays.asList(logMessages));
            this.recordedLoggerNames = new HashMap<String, List<String>>();
            for (String logMessage : logMessages) {
                recordedLoggerNames.put(logMessage, new ArrayList<String>());
            }
        }

        @Override
        protected void append(LoggingEvent event) {
            String logMessage = event.getRenderedMessage();
            if (recordedLogMessages.contains(logMessage)) {
                // add this hit to the list of the logger names we have got so far
                // for this log message
                List<String> actual = recordedLoggerNames.get(logMessage);
                actual.add(event.getLoggerName());
            }
        }

        List<String> getRecordedLoggerNamesFor(String logMessage) {
            return Collections.unmodifiableList(recordedLoggerNames.get(logMessage));
        }

        @Override
        public boolean requiresLayout() {
            return false;
        }

        @Override
        public void close() {
            // noop
        }
    }
}
{code}
                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4754.
--------------------------------

    Resolution: Fixed

Thanks for the patch. I went for number one and polished it a bit.
                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: CAMEL-4754-option-one.patch, CAMEL-4754-option-two.patch, debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166647#comment-13166647 ] 

Babak Vahdat commented on CAMEL-4754:
-------------------------------------

Attached two potential fixes you may want to consider (either one *or* two, but not both)

- CAMEL-4754-option-one.patch: to remedy the potential exception swallowing on junit.framework.ComparisonFailure, I hope my pointer I tried to explain in my previous posts is clear by now

- CAMEL-4754-option-two.patch: how did you name it? Yeah, this's the one with that logging appender "trick"

The decision is yours :-)
                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: CAMEL-4754-option-one.patch, CAMEL-4754-option-two.patch, debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4754.
--------------------------------

    Resolution: Fixed

This has API changes and a slightly bigger changes in the routing engine. So am a bit inclined to backport to a patch release, to only fix a route id in a log. And we have a known workaround.
                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (CAMEL-4754) The onException clause should make use of the correct logger name given through the log DSL

Posted by "Babak Vahdat (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat reopened CAMEL-4754:
---------------------------------


According to my previous post on this we should remedy this "false positive" effect while unit-testing, see the two provided patches for this.
                
> The onException clause should make use of the correct logger name given through the log DSL 
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4754
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4754
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.3
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: CAMEL-4754-option-one.patch, CAMEL-4754-option-two.patch, debugger.jpg
>
>
> See http://camel.465427.n5.nabble.com/global-onException-clause-wrongly-identifies-route-in-which-exception-occurs-log-name-td5058304.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira