audit/file: use JSON formatter to write output

This commit is contained in:
Mitchell Hashimoto
2015-04-13 14:12:14 -07:00
parent f7fa1df974
commit 164335cfd8

View File

@@ -35,8 +35,8 @@ func (b *Backend) LogRequest(auth *logical.Auth, req *logical.Request) error {
return err
}
// TODO
return nil
var format audit.FormatJSON
return format.FormatRequest(b.f, auth, req)
}
func (b *Backend) LogResponse(
@@ -48,8 +48,8 @@ func (b *Backend) LogResponse(
return err
}
// TODO
return nil
var format audit.FormatJSON
return format.FormatResponse(b.f, auth, req, resp, err)
}
func (b *Backend) open() error {