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

Add FormattingTuple as possible parameter for log methods

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • None
    • None
    • Core API
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: