tests: add a substitution pattern for HTTP error log dates
This will make tests with error log content less of a nuisance. I didn't roll
it into to $LOGDATE$ because the regex got long and line wrapped. It didn't
seem worth the obscurity.
--- a/tests/common-pattern.py Sun Apr 08 11:55:46 2018 +0900
+++ b/tests/common-pattern.py Sat Apr 07 13:10:20 2018 -0400
@@ -71,10 +71,14 @@
# (replacement patterns)
br'$USUAL_BUNDLE2_CAPS_SERVER$'
),
- # HTTP log dates
+ # HTTP access log dates
(br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "(GET|PUT|POST)',
lambda m: br' - - [$LOGDATE$] "' + m.group(1)
),
+ # HTTP error log dates
+ (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] (HG error:|Exception)',
+ lambda m: br' - - [$ERRDATE$] ' + m.group(1)
+ ),
# HTTP header dates- RFC 1123
(br'([Dd]ate): [A-Za-z]{3}, \d\d [A-Za-z]{3} \d{4} \d\d:\d\d:\d\d GMT',
lambda m: br'%s: $HTTP_DATE$' % m.group(1)