actually obey LOG_LEVEL env instead of always picking TRACE
This commit is contained in:
parent
59b79167a4
commit
d407222608
|
@ -3,10 +3,10 @@ include (val Logging.sublogs Server.logger "Main")
|
|||
let min_level =
|
||||
match Sys.getenv_opt "LOG_LEVEL" |> Option.map String.uppercase_ascii with
|
||||
| Some "TRACE" -> Logging.TRACE
|
||||
| Some "DEBUG" -> Logging.TRACE
|
||||
| Some "INFO" -> Logging.TRACE
|
||||
| Some ("WARN" | "WARNING") -> Logging.TRACE
|
||||
| Some ("ERR" | "ERROR") -> Logging.TRACE
|
||||
| Some "DEBUG" -> Logging.DEBUG
|
||||
| Some "INFO" -> Logging.INFO
|
||||
| Some ("WARN" | "WARNING") -> Logging.WARN
|
||||
| Some ("ERR" | "ERROR") -> Logging.ERROR
|
||||
| _ -> Logging.INFO
|
||||
|
||||
let no_color = Option.is_some (Sys.getenv_opt "LOG_NO_COLOR")
|
||||
|
|
Loading…
Reference in New Issue