Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-313

Add FormattingTuple as possible parameter for log methods

    Details

    • Type: Improvement
    • Status: Resolved
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core API
    • Labels:
      None
    • Environment:

      Operating System: Windows NT
      Platform: PC

      Description

      Add FormattingTuple as possible parameter for log methods.

      For example add

      Logger#error(Marker marker, FormattingTuple tuple);
      and
      Logger#error(FormattingTuple tuple);

      It is necessary in case it coder wants to use formatted message multiple times:

      FormattingTuple tuple = MessageFormatter.format("Can't create an order: {}", e.getLocalizedMessage(), e); //$NON-NLS-1$
      LOGGER.error(tuple.getMessage(), e);
      throw new IllegalStateException(tuple.getMessage());

        Attachments

          Activity

            People

            • Assignee:
              slf4j-dev SLF4J developers list
              Reporter:
              foal Stanislav Spiridonov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: