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 =
|
let min_level =
|
||||||
match Sys.getenv_opt "LOG_LEVEL" |> Option.map String.uppercase_ascii with
|
match Sys.getenv_opt "LOG_LEVEL" |> Option.map String.uppercase_ascii with
|
||||||
| Some "TRACE" -> Logging.TRACE
|
| Some "TRACE" -> Logging.TRACE
|
||||||
| Some "DEBUG" -> Logging.TRACE
|
| Some "DEBUG" -> Logging.DEBUG
|
||||||
| Some "INFO" -> Logging.TRACE
|
| Some "INFO" -> Logging.INFO
|
||||||
| Some ("WARN" | "WARNING") -> Logging.TRACE
|
| Some ("WARN" | "WARNING") -> Logging.WARN
|
||||||
| Some ("ERR" | "ERROR") -> Logging.TRACE
|
| Some ("ERR" | "ERROR") -> Logging.ERROR
|
||||||
| _ -> Logging.INFO
|
| _ -> Logging.INFO
|
||||||
|
|
||||||
let no_color = Option.is_some (Sys.getenv_opt "LOG_NO_COLOR")
|
let no_color = Option.is_some (Sys.getenv_opt "LOG_NO_COLOR")
|
||||||
|
|
Loading…
Reference in New Issue