Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-964

loggingErrorHandler should default to ERROR and LoggingErrorHandlerBuilder should operate as a builder

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.5.0
    • camel-core
    • None
    • Patch Available

    Description

      Please see attached patch which changes the default level created by the LoggingErrorHandlerBuilder to ERROR instead of INFO.

      Also some of the methods on this builder to not return "this". This breaks the chain when attempting to use the builder resulting in:

      LoggingErrorHandlerBuilder errorBuilder = loggingErrorHandler("my.logger.name");
      errorBuilder.setLevel(LoggingLevel.ERROR);
      errorHandler(errorBuilder);

      instead of:

      errorHandler(loggingErrorHandler("mylogger.name").level(LoggingLevel.ERROR));

      I have added on builder methods for "level" and for "log". I have left the properties that currently exist as following the pattern on DeadLetterChannelBuilder the builder method names should not include "set". Whoever applies the patch may wish to remove the getters and setters, depending how they feel this will affect existing users.

      Attachments

        1. logger.patch
          2 kB
          Martin Gilday

        Activity

          People

            davsclaus Claus Ibsen
            pledge Martin Gilday
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: