Ok. Log4j uses the usual java introspection mechanism. So, property names are case sensitive except for the first letter.


So, for AsyncAppender,

  <param name="BufferSize" value="1"/>
  <param name="bufferSize" value="1"/>

will work, but not

  <param name="buffersize" value="1"/>

Does that clarify the matter?

At 10:03 PM 2/24/2005, you wrote:
Don't know if it matters, but I think I am correct. I just changed the following XML line ...

                <param name="bufferSize" value="1"/>
To

                <param name="buffersize" value="1"/>

and step into log4J to this routine:

  public
  void setProperty(String name, String value) {
    if (value == null) return;

    name = Introspector.decapitalize(name);
    PropertyDescriptor prop = getPropertyDescriptor(name);

    //LogLog.debug("---------Key: "+name+", type="+prop.getPropertyType());

    if (prop == null) {
      LogLog.warn("No such property [" + name + "] in "+
                  obj.getClass().getName()+"." );
    } else {
      try {
        setProperty(prop, name, value);
      } catch (PropertySetterException ex) {
        LogLog.warn("Failed to set property [" + name +
                    "] to value \"" + value + "\". ", ex.rootCause);
      }
    }
  }

and prop return null if bufferSize case is not correct.

Al




-----Original Message----- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 2:55 PM To: Log4J Users List; Log4J Users List; James Stauffer Subject: RE: XML Configurator Parameter List

At 09:38 PM 2/24/2005, Harper, Allen (AHARPER) wrote:
>If you try that you'll find it's a bust. Specifically with the buffer
>size .
>It's case sensitive and must be "bufferSize".

Al, this is simply not true.

>I found this out by stepping into source code.
>
>Al

--
Ceki Gülcü

   The complete log4j manual: http://www.qos.ch/log4j/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

-- Ceki Gülcü

  The complete log4j manual: http://www.qos.ch/log4j/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to