summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-01-11 21:07:30 -0500
committerLLLL Colonq <llll@colonq>2024-01-11 21:07:30 -0500
commita36e438e9885d4c1450987c954d9d17db6791420 (patch)
tree0996e8680f441d2aaf8600f39b28e9d274c9301d
parentb95f7639c9a9617960811afcd9acaa9a4ed550c0 (diff)
Log to stderr
-rw-r--r--fig-utils/src/Fig/Prelude.hs4
1 files 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