summaryrefslogtreecommitdiff
path: root/src/DPut.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2018-06-21 14:07:06 -0400
committerjoe <joe@jerkface.net>2018-06-21 14:17:29 -0400
commit34d142e1c0494a223b8ebd30d120766262c4ae1e (patch)
tree7597809be9bac1e3081ed4bac4354d2d0a6c5a01 /src/DPut.hs
parente11c282d73301baf774d28d67db20af032429aad (diff)
The ToxToXMPP code should use XMan tag.
Diffstat (limited to 'src/DPut.hs')
-rw-r--r--src/DPut.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/DPut.hs b/src/DPut.hs
index 84f086b3..52714086 100644
--- a/src/DPut.hs
+++ b/src/DPut.hs
@@ -1,5 +1,6 @@
1module DPut where 1module DPut where
2 2
3import Control.Monad.IO.Class
3import Control.Concurrent.STM 4import Control.Concurrent.STM
4import qualified Data.Map.Strict as Map 5import qualified Data.Map.Strict as Map
5import System.IO (stderr,hPutStrLn) 6import System.IO (stderr,hPutStrLn)
@@ -20,11 +21,11 @@ appName = "toxmpp"
20(<.>) :: String -> String -> String 21(<.>) :: String -> String -> String
21a <.> b = a ++ "." ++ b 22a <.> b = a ++ "." ++ b
22 23
23dput :: DebugTag -> String -> IO () 24dput :: MonadIO m => DebugTag -> String -> m ()
24dput tag msg = debugM (appName <.> show tag) msg 25dput tag msg = liftIO $ debugM (appName <.> show tag) msg
25 26
26dputB :: DebugTag -> B.ByteString -> IO () 27dputB :: MonadIO m => DebugTag -> B.ByteString -> m ()
27dputB tag msg = debugM (appName <.> show tag) (T.unpack . T.decodeUtf8 $ msg) 28dputB tag msg = liftIO $ debugM (appName <.> show tag) (T.unpack . T.decodeUtf8 $ msg)
28 29
29setTagLevel :: Priority -> DebugTag -> IO () 30setTagLevel :: Priority -> DebugTag -> IO ()
30setTagLevel level tag = updateGlobalLogger (appName <.> show tag) (setLevel level) 31setTagLevel level tag = updateGlobalLogger (appName <.> show tag) (setLevel level)