From 53194614dff3bd95065429b9c9f23a7c206f3c49 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Wed, 16 Nov 2022 17:27:42 +0100 Subject: [PATCH] Switch to using camelCase for logs --- entrypoint/src/bootstrap/garage_global_bucket.go | 2 +- entrypoint/src/cmd/entrypoint/daemon.go | 2 +- entrypoint/src/cmd/entrypoint/garage_util.go | 4 ++-- entrypoint/src/cmd/entrypoint/proc_lock.go | 2 +- entrypoint/src/garage/admin_client.go | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/entrypoint/src/bootstrap/garage_global_bucket.go b/entrypoint/src/bootstrap/garage_global_bucket.go index 93c3226..c26a103 100644 --- a/entrypoint/src/bootstrap/garage_global_bucket.go +++ b/entrypoint/src/bootstrap/garage_global_bucket.go @@ -105,7 +105,7 @@ func (b Bootstrap) GetGarageBootstrapHosts( for objInfo := range objInfoCh { - ctx := mctx.Annotate(ctx, "object-key", objInfo.Key) + ctx := mctx.Annotate(ctx, "objectKey", objInfo.Key) if objInfo.Err != nil { return nil, fmt.Errorf("listing objects: %w", objInfo.Err) diff --git a/entrypoint/src/cmd/entrypoint/daemon.go b/entrypoint/src/cmd/entrypoint/daemon.go index e9888dd..2f88def 100644 --- a/entrypoint/src/cmd/entrypoint/daemon.go +++ b/entrypoint/src/cmd/entrypoint/daemon.go @@ -268,7 +268,7 @@ var subCmdDaemon = subCmd{ } logger.Info( - mctx.Annotate(ctx, "bootstrap-file-path", path), + mctx.Annotate(ctx, "bootstrapFilePath", path), "bootstrap file found", ) diff --git a/entrypoint/src/cmd/entrypoint/garage_util.go b/entrypoint/src/cmd/entrypoint/garage_util.go index d6b9f29..afea2b3 100644 --- a/entrypoint/src/cmd/entrypoint/garage_util.go +++ b/entrypoint/src/cmd/entrypoint/garage_util.go @@ -16,7 +16,7 @@ import ( ) func garageAdminClientLogger(logger *mlog.Logger) *mlog.Logger { - return logger.WithNamespace("garage-admin-client") + return logger.WithNamespace("garageAdminClient") } // newGarageAdminClient will return an AdminClient for a local garage instance, @@ -73,7 +73,7 @@ func waitForGarageAndNebula( adminClientLogger, ) - ctx := mctx.Annotate(ctx, "garage-admin-addr", adminAddr) + ctx := mctx.Annotate(ctx, "garageAdminAddr", adminAddr) logger.Debug(ctx, "wating for garage instance to start") if err := adminClient.Wait(ctx); err != nil { diff --git a/entrypoint/src/cmd/entrypoint/proc_lock.go b/entrypoint/src/cmd/entrypoint/proc_lock.go index 628ff55..9328be0 100644 --- a/entrypoint/src/cmd/entrypoint/proc_lock.go +++ b/entrypoint/src/cmd/entrypoint/proc_lock.go @@ -49,7 +49,7 @@ func writeLock() error { // returns a cleanup function which will clean up the created runtime directory. func setupAndLockRuntimeDir(ctx context.Context, logger *mlog.Logger) (func(), error) { - ctx = mctx.Annotate(ctx, "runtime-dir-path", envRuntimeDirPath) + ctx = mctx.Annotate(ctx, "runtimeDirPath", envRuntimeDirPath) logger.Info(ctx, "will use runtime directory for temporary state") if err := os.MkdirAll(envRuntimeDirPath, 0700); err != nil { diff --git a/entrypoint/src/garage/admin_client.go b/entrypoint/src/garage/admin_client.go index 5755dd7..13fa6d4 100644 --- a/entrypoint/src/garage/admin_client.go +++ b/entrypoint/src/garage/admin_client.go @@ -163,8 +163,8 @@ func (c *AdminClient) Wait(ctx context.Context) error { } ctx := mctx.Annotate(ctx, - "num-known-nodes", len(clusterStatus.KnownNodes), - "num-up", numUp, + "numKnownNodes", len(clusterStatus.KnownNodes), + "numUp", numUp, ) if numUp >= ReplicationFactor-1 {