middleware/log: make {size} the length of the request (#449)

* middleware/log: make {size} the length of the request

{size} is the lenght of the request, {rsize} is the length of the
reply.

* Fix test
This commit is contained in:
Miek Gieben
2016-11-30 20:44:00 +00:00
committed by GitHub
parent b85c6788dd
commit b086e5f64d
4 changed files with 10 additions and 8 deletions

View File

@@ -80,7 +80,7 @@ const (
// DefaultLogFilename is the default log filename.
DefaultLogFilename = "query.log"
// CommonLogFormat is the common log format.
CommonLogFormat = `{remote} ` + CommonLogEmptyValue + ` [{when}] "{type} {class} {name} {proto} {>do} {>bufsize}" {rcode} {size} {duration}`
CommonLogFormat = `{remote} ` + CommonLogEmptyValue + ` [{when}] "{type} {class} {name} {proto} {size} {>do} {>bufsize}" {rcode} {rsize} {duration}`
// CommonLogEmptyValue is the common empty log value.
CommonLogEmptyValue = "-"
// CombinedLogFormat is the combined log format.