From a36e438e9885d4c1450987c954d9d17db6791420 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Thu, 11 Jan 2024 21:07:30 -0500 Subject: Log to stderr --- fig-utils/src/Fig/Prelude.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fig-utils/src/Fig/Prelude.hs b/fig-utils/src/Fig/Prelude.hs index ceddba0..6db69cf 100644 --- a/fig-utils/src/Fig/Prelude.hs +++ b/fig-utils/src/Fig/Prelude.hs @@ -61,7 +61,7 @@ import Data.Bool (Bool(..), otherwise, not, (&&), (||)) import Data.Char (Char, isUpper) import Data.Int (Int) import Data.Text (Text, pack, unpack, unwords) -import Data.Text.IO (putStrLn) +import Data.Text.IO (hPutStrLn) import Data.Text.Encoding (decodeUtf8, decodeUtf8', encodeUtf8) import Data.ByteString (ByteString, readFile, writeFile) import Data.Tuple (fst, snd, curry, uncurry, swap) @@ -110,7 +110,7 @@ log :: MonadIO m => Text -> m () log msg = do t <- liftIO Time.getCurrentTime let time = Time.formatTime Time.defaultTimeLocale "[%F %T] " t - liftIO . putStrLn $ pack time <> msg + liftIO . hPutStrLn stderr $ pack time <> msg class Pretty a where pretty :: a -> Text -- cgit v1.2.3