Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The log4j-config.xsd file defines KeyValuePairs in Filter as:
<xs:sequence> <xs:element name="KeyValuePair" type="KeyValuePairType" minOccurs="0"/> </xs:sequence>
DynamicThresholdFilter can in fact take multiple KeyValuePairs. But that will not pass xsd validation because KeyValuePair is missing 'maxOccurs="unbounded"' attribute.
Example: The following config will fail validation, although it should not:
<Filter type="DynamicThresholdFilter" key="some-key" defaultThreshold="INFO" onMatch="ACCEPT" onMismatch="NEUTRAL"> <KeyValuePair key="debug" value="DEBUG"/> <KeyValuePair key="trace" value="TRACE"/> </Filter>
If I remove one of the KeyValuePairs, it would pass. I use strict=true, and I cannot change that for various other reasons.