[jboss-svn-commits] JBoss Common SVN: r3346 - jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/filters.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jul 8 21:05:15 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-07-08 21:05:14 -0400 (Wed, 08 Jul 2009)
New Revision: 3346

Modified:
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/filters/SubstituteFilter.java
Log:
Container-friendly constructor

Modified: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/filters/SubstituteFilter.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/filters/SubstituteFilter.java	2009-07-09 01:03:44 UTC (rev 3345)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/filters/SubstituteFilter.java	2009-07-09 01:05:14 UTC (rev 3346)
@@ -51,6 +51,17 @@
     }
 
     /**
+     * Construct a new instance.
+     *
+     * @param patternString the pattern to match
+     * @param replacement the string replacement
+     * @param replaceAll {@code true} if all occurrances should be replaced; {@code false} if only the first occurrance
+     */
+    public SubstituteFilter(final String patternString, final String replacement, final boolean replaceAll) {
+        this(Pattern.compile(patternString), replacement, replaceAll);
+    }
+
+    /**
      * Apply the filter to the given log record.
      *
      * @param record the log record to inspect and modify




More information about the jboss-svn-commits mailing list