mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
feat: fiber logs with zerlog and add trace level (#2082)
Signed-off-by: Chris Jowett <421501+cryptk@users.noreply.github.com>
This commit is contained in:
parent
1038f7469c
commit
8d30b39811
9 changed files with 45 additions and 39 deletions
11
main.go
11
main.go
|
@ -91,17 +91,20 @@ Version: ${version}
|
|||
|
||||
switch *cli.CLI.LogLevel {
|
||||
case "error":
|
||||
log.Info().Msg("Setting logging to error")
|
||||
zerolog.SetGlobalLevel(zerolog.ErrorLevel)
|
||||
log.Info().Msg("Setting logging to error")
|
||||
case "warn":
|
||||
log.Info().Msg("Setting logging to warn")
|
||||
zerolog.SetGlobalLevel(zerolog.WarnLevel)
|
||||
log.Info().Msg("Setting logging to warn")
|
||||
case "info":
|
||||
log.Info().Msg("Setting logging to info")
|
||||
zerolog.SetGlobalLevel(zerolog.InfoLevel)
|
||||
log.Info().Msg("Setting logging to info")
|
||||
case "debug":
|
||||
log.Info().Msg("Setting logging to debug")
|
||||
zerolog.SetGlobalLevel(zerolog.DebugLevel)
|
||||
log.Debug().Msg("Setting logging to debug")
|
||||
case "trace":
|
||||
zerolog.SetGlobalLevel(zerolog.TraceLevel)
|
||||
log.Trace().Msg("Setting logging to trace")
|
||||
}
|
||||
|
||||
// Populate the application with the embedded backend assets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue