middleware/log: allows logging based on response classes (#325)
Add the ability to add a class of responses to be logged; success, denial or error. The default is to log everything (all). Fixes #258
This commit is contained in:
parent
caa3976bfe
commit
c22b7b2252
13 changed files with 348 additions and 108 deletions
2
middleware/cache/cache_test.go
vendored
2
middleware/cache/cache_test.go
vendored
|
@ -94,7 +94,7 @@ func TestCache(t *testing.T) {
|
|||
m = cacheMsg(m, tc)
|
||||
do := tc.in.Do
|
||||
|
||||
mt, _ := response.Classify(m)
|
||||
mt, _ := response.Typify(m)
|
||||
k := key(m, mt, do)
|
||||
crr.set(m, k, mt, c.pttl)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue