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

SetLoggerTag missing setter for value attribute (or tld wrongly requires value attribute for setLogger tag)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0-beta6
    • 2.0-beta7
    • Taglib
    • None

    Description

      I have the taglib imported thus:

      <%@ taglib uri="http://logging.apache.org/log4j/tld/log" prefix="log" %>

      and then tried to use setLogger as follows:

      <log:setLogger value="com.example.jsp.errors" />

      but this results in the following:

      Exception caught in jsp
      org.apache.jasper.JasperException: /WEB-INF/pages/orderform/error.jsp(13,0) Unable to find setter method for attribute: value
      ... etc.

      Had a quick nose around and the value attribute is marked as required in the tld, but the SetLoggerTag class doesn't have a setValue(...) method...

      From what I saw, wondered if in fact the value attribute is meant to have gone away and one should be using the logger attribute which is there in the class, but has no mention in the tld.

      Attachments

        Activity

          People

            beamerblvd Nick Williams
            jonarcher Jon Archer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: