summaryrefslogtreecommitdiffhomepage
path: root/Log.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-21 22:35:57 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-21 22:35:57 -0400
commit94a94c36cf0eba38b85b8fb6c360c14abae7031f (patch)
tree0e13740582f22f19aa5bd3c24fa53f3cc7c7ca47 /Log.hs
parent75c8b6b9745ea8e64383e28d3f18b1609be00fa3 (diff)
downloaddebug-me-94a94c36cf0eba38b85b8fb6c360c14abae7031f.tar.gz
added debug-me --watch mode
This commit was sponsored by Ewen McNeill.
Diffstat (limited to 'Log.hs')
-rw-r--r--Log.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Log.hs b/Log.hs
index ec7078e..50c506d 100644
--- a/Log.hs
+++ b/Log.hs
@@ -68,6 +68,9 @@ type Logger = LogMessage -> IO ()
withLogger :: FilePath -> (Logger -> IO a) -> IO a
withLogger logfile a = withFile logfile WriteMode (a . mkLogger)
+nullLogger :: Logger
+nullLogger _ = return ()
+
mkLogger :: Handle -> Logger
mkLogger h a = do
l <- mkLog a <$> getPOSIXTime