summaryrefslogtreecommitdiffhomepage
path: root/Log.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Log.hs')
-rw-r--r--Log.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Log.hs b/Log.hs
index 05cbdc3..ec7078e 100644
--- a/Log.hs
+++ b/Log.hs
@@ -71,6 +71,10 @@ withLogger logfile a = withFile logfile WriteMode (a . mkLogger)
mkLogger :: Handle -> Logger
mkLogger h a = do
l <- mkLog a <$> getPOSIXTime
+ writeLogHandle l h
+
+writeLogHandle :: Log -> Handle -> IO ()
+writeLogHandle l h = do
L.hPut h (encode l)
hPutStr h "\n"
hFlush h