You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by sd...@apache.org on 2004/03/26 17:43:23 UTC
cvs commit: logging-log4j/src/java/org/apache/log4j/spi LoggingEventFieldResolver.java
sdeboy 2004/03/26 08:43:23
Modified: src/java/org/apache/log4j/spi LoggingEventFieldResolver.java
Log:
fixed regression - previous change to improve rule validation inadvertently disabled PROP and MDC keyword support in rules
Revision Changes Path
1.5 +4 -1 logging-log4j/src/java/org/apache/log4j/spi/LoggingEventFieldResolver.java
Index: LoggingEventFieldResolver.java
===================================================================
RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/spi/LoggingEventFieldResolver.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LoggingEventFieldResolver.java 27 Feb 2004 16:47:34 -0000 1.4
+++ LoggingEventFieldResolver.java 26 Mar 2004 16:43:23 -0000 1.5
@@ -119,7 +119,10 @@
}
public boolean isField(String fieldName) {
- return ((fieldName != null) && (keywordList.contains(fieldName.toUpperCase())));
+ if (fieldName != null) {
+ return (keywordList.contains(fieldName.toUpperCase()) || fieldName.toUpperCase().startsWith(MDC_FIELD) || fieldName.toUpperCase().startsWith(PROP_FIELD));
+ }
+ return false;
}
public Object getValue(String fieldName, LoggingEvent event) {
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org