mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 18:33:19 +02:00
core/logging: change log.Error function (#5251)
* core/logging: change log.Error function * use request id
This commit is contained in:
parent
97bf5edc54
commit
dad954ae16
66 changed files with 163 additions and 166 deletions
|
@ -78,7 +78,7 @@ func (mgr *MetricsManager) updateInfo(ctx context.Context, cfg *Config) {
|
|||
|
||||
hostname, err := os.Hostname()
|
||||
if err != nil {
|
||||
log.Error(ctx).Err(err).Msg("telemetry/metrics: failed to get OS hostname")
|
||||
log.Ctx(ctx).Error().Err(err).Msg("telemetry/metrics: failed to get OS hostname")
|
||||
hostname = "__unknown__"
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ func (mgr *MetricsManager) updateServer(ctx context.Context, cfg *Config) {
|
|||
})
|
||||
handler, err := metrics.PrometheusHandler(toInternalEndpoints(mgr.endpoints), mgr.installationID, defaultMetricsTimeout)
|
||||
if err != nil {
|
||||
log.Error(ctx).Err(err).Msg("metrics: failed to create prometheus handler")
|
||||
log.Ctx(ctx).Error().Err(err).Msg("metrics: failed to create prometheus handler")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue