mw/logs: add rflags to logging (#845)

Add the DNS message response flags as {rflags} to the default logging
Also complete the replacer testing that is was commented out.
And (unrelated) Switch erratic and whoami to ease testing.

Note: {flags} could and should be added as well - but we can leave that
as a beginners bug.
This commit is contained in:
Miek Gieben
2017-08-07 03:49:40 -07:00
committed by GitHub
parent bcb2eb1ecc
commit 050eccd69e
6 changed files with 104 additions and 115 deletions

View File

@@ -78,10 +78,10 @@ type Rule struct {
}
const (
// DefaultLogFilename is the default output name.
// DefaultLogFilename is the default output name. This is the only supported value.
DefaultLogFilename = "stdout"
// CommonLogFormat is the common log format.
CommonLogFormat = `{remote} ` + CommonLogEmptyValue + ` [{when}] "{type} {class} {name} {proto} {size} {>do} {>bufsize}" {rcode} {rsize} {duration}`
CommonLogFormat = `{remote} ` + CommonLogEmptyValue + ` [{when}] "{type} {class} {name} {proto} {size} {>do} {>bufsize}" {rcode} {>rflags} {rsize} {duration}`
// CommonLogEmptyValue is the common empty log value.
CommonLogEmptyValue = "-"
// CombinedLogFormat is the combined log format.