actually obey LOG_LEVEL env instead of always picking TRACE

This commit is contained in:
tali 2024-02-02 13:23:19 -05:00
parent 59b79167a4
commit d407222608
1 changed files with 4 additions and 4 deletions

View File

@ -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")