update a few more log event property names

This commit is contained in:
Kenneth Jenkins 2025-04-22 10:16:17 -07:00
parent 4842e696cf
commit a80936361e
7 changed files with 12 additions and 12 deletions

View file

@ -163,7 +163,7 @@ func NewFileOrEnvironmentSource(
func (src *FileOrEnvironmentSource) check(ctx context.Context) {
ctx = log.WithContext(ctx, func(c zerolog.Context) zerolog.Context {
return c.Str("config_change_id", uuid.New().String())
return c.Str("config-change-id", uuid.New().String())
})
src.mu.Lock()
cfg := src.config

View file

@ -106,7 +106,7 @@ func New(ctx context.Context, cfg *config.Config, eventsMgr *events.Manager, opt
}
ctx = log.WithContext(ctx, func(c zerolog.Context) zerolog.Context {
return c.Str("service", "databroker").Str("config_source", "bootstrap")
return c.Str("service", "databroker").Str("config-source", "bootstrap")
})
localGRPCConnection, err := grpc.DialContext(
ctx,

View file

@ -219,10 +219,10 @@ func (mgr *Manager) renewConfigCerts(ctx context.Context) error {
ctx = log.WithContext(ctx, func(c zerolog.Context) zerolog.Context {
if len(renew) > 0 {
c = c.Strs("renew_domains", renew)
c = c.Strs("renew-domains", renew)
}
if len(ocsp) > 0 {
c = c.Strs("ocsp_refresh", ocsp)
c = c.Strs("ocsp-refresh", ocsp)
}
return c
})

View file

@ -98,7 +98,7 @@ func NewServer(
}
ctx = log.WithContext(ctx, func(c zerolog.Context) zerolog.Context {
return c.Str("server_name", cfg.Options.Services)
return c.Str("server-name", cfg.Options.Services)
})
var err error

View file

@ -178,7 +178,7 @@ func (c *service) syncUpdatedBundle(ctx context.Context, key string, cached *Bun
log.Ctx(ctx).Debug().
Str("bundle", key).
Strs("record_types", bundleRecordTypes).
Strs("record-types", bundleRecordTypes).
Str("etag", current.ETag).
Str("last-modified", current.LastModified).
Interface("metadata", result.Metadata).
@ -213,9 +213,9 @@ func (c *service) getUpdatedMetadata(ctx context.Context, key string, cached Bun
log.Ctx(ctx).Debug().
Str("bundle", key).
Strs("record_types", current.RecordTypes).
Strs("record-types", current.RecordTypes).
Str("etag", current.ETag).
Str("last_modified", current.LastModified).
Str("last-modified", current.LastModified).
Interface("metadata", result.Metadata).
Msg("metadata updated")

View file

@ -95,7 +95,7 @@ func (locker *Leaser) runOnce(ctx context.Context, resetBackoff func()) error {
if status.Code(err) == codes.AlreadyExists {
return nil
} else if err != nil {
log.Ctx(ctx).Error().Err(err).Str("lease_name", locker.leaseName).Msg("leaser: error acquiring lease")
log.Ctx(ctx).Error().Err(err).Str("lease-name", locker.leaseName).Msg("leaser: error acquiring lease")
return retryableError{err}
}
resetBackoff()

View file

@ -222,9 +222,9 @@ func (backend *Backend) Put(ctx context.Context, records []*databroker.Record) (
}
ctx = log.WithContext(ctx, func(c zerolog.Context) zerolog.Context {
return c.Str("db_op", "put").
Str("db_id", record.Id).
Str("db_type", record.Type)
return c.Str("db-op", "put").
Str("db-id", record.Id).
Str("db-type", record.Type)
})
backend.update(record)