Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-291

message implicit variable should have a more detailed documentation and usage for the EvaluatorFilter

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • logback-core
    • None
    • Windows XP, Java 1.5 Sun JVM, Tomcat 5.0.27

    Description

      I was expecting "message" implicit variable to contain the full message rendered by the %message or %msg from the pattern, but the recommanded way of logging,
      using LOG.debug("I want to log an object {}", object); is only formatted in the event.getFormattedMessage(), event.getMessage <=> message, but only contains the "I want to log an object {}"
      so if my matching string for the expression setting for the EvaluatorFilter is the dynamical part I can't never match my string, instead it got "{}".

      So, it would be less confusing for users to find in the documentation an explicit information on what message variable contains, and does not contain!

      Thank you

      I would be happy to explain my point if you find it unclear or irrelevant.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            jbos Johan Bos
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: