Skip to content

Commit 42d44b8

Browse files
authored
fix: module logger should respect the CLI log flags (#505)
Signed-off-by: Chetan Banavikalmutt <[email protected]>
1 parent 9fcddcf commit 42d44b8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

internal/logging/logging.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ package logging
2323
import (
2424
"fmt"
2525
"io"
26-
"os"
2726
"strings"
2827

2928
"github.com/sirupsen/logrus"
@@ -56,13 +55,8 @@ const (
5655
var defaultLogger *logrus.Logger
5756

5857
func init() {
59-
// Initialize the default logger with sensible defaults
60-
defaultLogger = logrus.New()
61-
defaultLogger.SetLevel(logrus.InfoLevel)
62-
defaultLogger.SetFormatter(&logrus.TextFormatter{
63-
FullTimestamp: true,
64-
})
65-
defaultLogger.SetOutput(os.Stdout)
58+
// Use the process-wide standard logger so that CLI flags and InitLogging() apply here too
59+
defaultLogger = logrus.StandardLogger()
6660
}
6761

6862
// SetupLogging configures the global logger with the provided options

0 commit comments

Comments
 (0)