Skip to content

Commit

Permalink
Expose log logrus level
Browse files Browse the repository at this point in the history
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
  • Loading branch information
evidolob authored and anjannath committed Jul 10, 2023
1 parent d066d48 commit efb0d2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/crc/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ func InitLogrus(logFilePath string) {
}))
}

func DefaultLogLevel() logrus.Level {
level, err := logrus.ParseLevel(logLevel)
if err != nil {
level = logrus.InfoLevel
}
return level
}

func defaultLogLevel() string {
defaultLevel := "info"
envLogLevel := os.Getenv("CRC_LOG_LEVEL")
Expand Down

0 comments on commit efb0d2b

Please sign in to comment.