From de56b29f53bfb3f24ed271d53a67fcdfc4d75c73 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 8 Mar 2016 15:30:50 -0500 Subject: [PATCH] Put time in logs --- Main.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Main.hs b/Main.hs index e8de88f..85330f1 100644 --- a/Main.hs +++ b/Main.hs @@ -28,7 +28,9 @@ instance Ord JID where compare x y = compare (show x) (show y) log :: (Show a, MonadIO m) => String -> a -> m () -log tag x = liftIO $ putStr (fromString $ tag <> " :: ") >> print x >> putStrLn mempty +log tag x = liftIO $ do + time <- getCurrentTime + putStr (fromString $ show time <> " " <> tag <> " :: ") >> print x >> putStrLn mempty data StanzaRec = StanzaRec (Maybe JID) (Maybe JID) (Maybe Text) (Maybe Text) [Element] Element deriving (Show) mkStanzaRec x = StanzaRec (stanzaTo x) (stanzaFrom x) (stanzaID x) (stanzaLang x) (stanzaPayloads x) (stanzaToElement x) -- 2.38.5