mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-23 19:49:13 +02:00
logging: remove ctx from global log methods (#5337)
* log: remove warn * log: update debug * log: update info * remove level, log * remove contextLogger function
This commit is contained in:
parent
1ccaf1b22b
commit
d2c14cd6d2
53 changed files with 150 additions and 198 deletions
|
@ -45,7 +45,7 @@ func accessLogListener(
|
|||
if failure == "" {
|
||||
continue
|
||||
}
|
||||
e := log.Info(ctx).Str("service", "envoy")
|
||||
e := log.Ctx(ctx).Info().Str("service", "envoy")
|
||||
dict := zerolog.Dict()
|
||||
populateCertEventDict(entry.GetCommonProperties().GetTlsProperties().GetPeerCertificateProperties(), dict)
|
||||
e.Dict("client-certificate", dict)
|
||||
|
@ -63,9 +63,9 @@ func (srv *Server) accessLogHTTP(
|
|||
reqPath := entry.GetRequest().GetPath()
|
||||
var evt *zerolog.Event
|
||||
if reqPath == "/ping" || reqPath == "/healthz" {
|
||||
evt = log.Debug(ctx)
|
||||
evt = log.Ctx(ctx).Debug()
|
||||
} else {
|
||||
evt = log.Info(ctx)
|
||||
evt = log.Ctx(ctx).Info()
|
||||
}
|
||||
evt = evt.Str("service", "envoy")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue