Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3647

Equivalence of `LogBuilder` and `Logger` calls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.20.0
    • Core
    • None

    Description

      The following two calls should behave in the same way:

      logger.info(marker, "Hello Log4j2 Core!");
      logger.atInfo().withMarker(marker).log("Hello Log4j2 Core!");
      

      If we use global filters and the filter returns ACCEPT, the first call will log a message even if the logger's level is lower than INFO. The second call will not log anything.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pkarwasz Piotr Karwasz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: