summaryrefslogtreecommitdiffhomepage
path: root/Log.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Log.hs')
-rw-r--r--Log.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Log.hs b/Log.hs
index 948ab19..ffb4eb7 100644
--- a/Log.hs
+++ b/Log.hs
@@ -20,7 +20,7 @@ import System.IO
-- Note that changing this in ways that change the JSON serialization
-- changes debug-me's log file format.
data Log = Log
- { loggedMessage :: LogMessage
+ { loggedMessage :: AnyMessage
, loggedHash :: Maybe Hash
, loggedTimestamp :: Timestamp
}
@@ -34,7 +34,7 @@ instance DataSize Log where
instance ToJSON Log
instance FromJSON Log
-mkLog :: LogMessage -> POSIXTime -> Log
+mkLog :: AnyMessage -> POSIXTime -> Log
mkLog m now = Log
{ loggedMessage = m
, loggedHash = case m of
@@ -47,7 +47,7 @@ mkLog m now = Log
type Timestamp = POSIXTime
-type Logger = LogMessage -> IO ()
+type Logger = AnyMessage -> IO ()
withLogger :: FilePath -> (Logger -> IO a) -> IO a
withLogger logfile a = withFile logfile WriteMode (a . mkLogger)