Adjusted date expression for apahce error log
[gnucomo.git] / src / gcm_input / error_cooker.cpp
index 4311414..63fa891 100644 (file)
@@ -50,8 +50,8 @@
 
 #include "error_cooker.h"
 
-static const String unix_date_re("[[:alpha:]]{3} [[:alpha:]]{3} [ 123][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]{4}");
-static const regex re_errorlog("^\\[" + unix_date_re + "\\] \\[(error|notice|warn|info)\\] .+");
+static const String unix_date_re("[[:alpha:]]{3} [[:alpha:]]{3} [ 0123][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)? [0-9]{4}");
+static const regex re_errorlog("^\\[" + unix_date_re + "\\] \\[.*(error|notice|warn|info|debug)\\] .+");
 
 bool error_cooker::check_pattern(String logline)
 {