diff options
author | Ben Sima <ben@bsima.me> | 2022-08-04 09:48:10 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2022-08-04 09:48:10 -0400 |
commit | f3539856541e07ec38b1eb3678f77a39b3b8c7db (patch) | |
tree | 2b30769e24e1a673de0777659b3dac072a3a24d2 /Biz/Log.hs | |
parent | 7b89187e865716bd20bf41c998e30bc91fa3f0b7 (diff) |
Improve bild logging
Diffstat (limited to 'Biz/Log.hs')
-rw-r--r-- | Biz/Log.hs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -23,6 +23,7 @@ module Biz.Log -- * Low-level msg, + fmt, br, ) where @@ -57,7 +58,7 @@ msg lvl labels = where -- For systemd-journal, emacs *compilation* buffers, etc. putDumb = putStr <| txt <> "\n" - txt = Text.intercalate gap (label : labels) + txt = fmt (label : labels) (color, label) = case lvl of Good -> (green, "good") Pass -> (green, "pass") @@ -67,6 +68,10 @@ msg lvl labels = Mark -> (magenta, "mark") clear = "\ESC[2K" +-- | Helper function for formatting outputs of labels. +fmt :: [Text] -> Text +fmt = Text.intercalate gap + gap :: Text gap = ": " |