diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-10-10 02:17:58 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-10-10 02:17:58 +0000 |
| commit | 90e41279094c26e6fcc93966708374b8ceba80e4 (patch) | |
| tree | 1b3dbf67da6655bc3458f7a4f1f2595c0e197d16 /lib/Logger.ml | |
| parent | 6201bbc6e7171f037467bbfc2d0a6da084fb516c (diff) | |
| download | RNT-lifecycle-ergonomics.tar.gz RNT-lifecycle-ergonomics.zip | |
Stylelifecycle-ergonomics
Diffstat (limited to '')
| -rw-r--r-- | lib/Logger.ml | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Logger.ml b/lib/Logger.ml index ebb6c97..3355e23 100644 --- a/lib/Logger.ml +++ b/lib/Logger.ml @@ -1,5 +1,4 @@ type level = Debug | Info | Warn | Error | Fatal - type colors = Foreground | Blue | Yellow | Red | Purple let reset = "\027[0m" @@ -13,10 +12,7 @@ let color_for = function | Purple -> "\027[35m" let colored color text = Printf.sprintf "%s%s%s%s" (color_for color) bold text reset - -let channel_for = function - | Warn | Error | Fatal -> stderr - | _ -> stdout +let channel_for = function Warn | Error | Fatal -> stderr | _ -> stdout let prefix_for = function | Debug -> colored Foreground "[DEBUG]" @@ -25,5 +21,4 @@ let prefix_for = function | Error -> colored Red "[ERROR]" | Fatal -> colored Purple "[FATAL]" -let log level message = - Printf.fprintf (channel_for level) "%s %s\n" (prefix_for level) message +let log level message = Printf.fprintf (channel_for level) "%s %s\n" (prefix_for level) message |
