Sql requests typically consists of multiple lines of text, I think it would be
useful to enable MULTILINE and DOTALL flags for regular expressions used to
transform request description.
Here is patch implementing the feature.
diff --git a/src/main/java/net/bull/javamelody/FilterContext.java
b/src/main/java/net/bull/javamelody/FilterContext.java
index 18c6e3f..f1c4ce7 100644
--- a/src/main/java/net/bull/javamelody/FilterContext.java
+++ b/src/main/java/net/bull/javamelody/FilterContext.java
@@ -172,7 +172,8 @@
final Parameter parameter = Parameter.valueOfIgnoreCase(counter.getName()
+ "_TRANSFORM_PATTERN");
if (Parameters.getParameter(parameter) != null) {
- final Pattern pattern =
Pattern.compile(Parameters.getParameter(parameter));
+ final Pattern pattern = Pattern.compile(Parameters.getParameter(parameter),
+ Pattern.MULTILINE + Pattern.DOTALL);
counter.setRequestTransformPattern(pattern);
}
}
Original issue reported on code.google.com by michal.b...@gmail.com on 15 Apr 2015 at 12:39
Original issue reported on code.google.com by
michal.b...@gmail.com
on 15 Apr 2015 at 12:39