From bc54a78be2d31ad269c628cac6e0e463ca60ca4a Mon Sep 17 00:00:00 2001 From: Kislay Kishore Date: Fri, 9 Aug 2024 15:22:53 +0530 Subject: [PATCH] Incorporate review comments --- cfg/types.go | 2 +- cmd/legacy_main.go | 2 +- internal/logger/logger.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cfg/types.go b/cfg/types.go index f8194db9cc..6681819355 100644 --- a/cfg/types.go +++ b/cfg/types.go @@ -35,7 +35,7 @@ func (o *Octal) UnmarshalText(text []byte) error { return nil } -func (o Octal) MarshalText() (text []byte, err error) { +func (o Octal) MarshalText() (text []byte, _ error) { return []byte(strconv.FormatInt(int64(o), 8)), nil } diff --git a/cmd/legacy_main.go b/cmd/legacy_main.go index be976ece5f..d01e2652c4 100644 --- a/cmd/legacy_main.go +++ b/cmd/legacy_main.go @@ -297,7 +297,7 @@ func runCLIApp(c *cli.Context) (err error) { // if these are already being logged into a log-file, otherwise // there will be duplicate logs for these in both places (stdout and log-file). if newConfig.Foreground || newConfig.Logging.FilePath == "" { - logger.Logger().Info("GCSFuse config", "config", newConfig) + logger.SLogger().Info("GCSFuse config", "config", newConfig) } // The following will not warn if the user explicitly passed the default value for StatCacheCapacity. diff --git a/internal/logger/logger.go b/internal/logger/logger.go index f8e97bb93c..c9d4dd73ff 100644 --- a/internal/logger/logger.go +++ b/internal/logger/logger.go @@ -42,11 +42,11 @@ var ( defaultLogger *slog.Logger ) -// Logger exports the slog logger. +// SLogger exports the slog logger. // This allows one to use the full breadth of features provided by slog. // // TODO: export defaultLogger instead of using this function. -func Logger() *slog.Logger { +func SLogger() *slog.Logger { return defaultLogger }