Switch to using camelCase for logs

This commit is contained in:
Brian Picciano 2022-11-16 17:27:42 +01:00
parent 2181da14a1
commit 53194614df
5 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -268,7 +268,7 @@ var subCmdDaemon = subCmd{
}
logger.Info(
mctx.Annotate(ctx, "bootstrap-file-path", path),
mctx.Annotate(ctx, "bootstrapFilePath", path),
"bootstrap file found",
)

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {