diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java b/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java index 396bb8e..8ec0008 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java +++ b/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java @@ -222,13 +222,11 @@ public class HttpAccessLogAnalyzer * the line * @return the http log */ - public static HttpAccessLog parseLog(final String line, final String pattern) + public static HttpAccessLog parseLog(final String line, final Pattern pattern) { HttpAccessLog result; - Pattern combined = Pattern.compile(pattern); - - Matcher matcher = combined.matcher(line); + Matcher matcher = pattern.matcher(line); if (matcher.matches()) { result = new HttpAccessLog(); @@ -266,7 +264,9 @@ public class HttpAccessLogAnalyzer // '"$http_referer" "$http_user_agent"'; String combinedPattern = "^(?[a-zA-F0-9\\\\:\\\\.]+) - (?\\S+) \\[(?