diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-04-21 22:35:57 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-04-21 22:35:57 -0400 |
commit | 94a94c36cf0eba38b85b8fb6c360c14abae7031f (patch) | |
tree | 0e13740582f22f19aa5bd3c24fa53f3cc7c7ca47 /Log.hs | |
parent | 75c8b6b9745ea8e64383e28d3f18b1609be00fa3 (diff) | |
download | debug-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.hs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |