diff options
author | joe <joe@jerkface.net> | 2018-06-21 14:07:06 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2018-06-21 14:17:29 -0400 |
commit | 34d142e1c0494a223b8ebd30d120766262c4ae1e (patch) | |
tree | 7597809be9bac1e3081ed4bac4354d2d0a6c5a01 /src/DPut.hs | |
parent | e11c282d73301baf774d28d67db20af032429aad (diff) |
The ToxToXMPP code should use XMan tag.
Diffstat (limited to 'src/DPut.hs')
-rw-r--r-- | src/DPut.hs | 9 |
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 @@ | |||
1 | module DPut where | 1 | module DPut where |
2 | 2 | ||
3 | import Control.Monad.IO.Class | ||
3 | import Control.Concurrent.STM | 4 | import Control.Concurrent.STM |
4 | import qualified Data.Map.Strict as Map | 5 | import qualified Data.Map.Strict as Map |
5 | import System.IO (stderr,hPutStrLn) | 6 | import System.IO (stderr,hPutStrLn) |
@@ -20,11 +21,11 @@ appName = "toxmpp" | |||
20 | (<.>) :: String -> String -> String | 21 | (<.>) :: String -> String -> String |
21 | a <.> b = a ++ "." ++ b | 22 | a <.> b = a ++ "." ++ b |
22 | 23 | ||
23 | dput :: DebugTag -> String -> IO () | 24 | dput :: MonadIO m => DebugTag -> String -> m () |
24 | dput tag msg = debugM (appName <.> show tag) msg | 25 | dput tag msg = liftIO $ debugM (appName <.> show tag) msg |
25 | 26 | ||
26 | dputB :: DebugTag -> B.ByteString -> IO () | 27 | dputB :: MonadIO m => DebugTag -> B.ByteString -> m () |
27 | dputB tag msg = debugM (appName <.> show tag) (T.unpack . T.decodeUtf8 $ msg) | 28 | dputB tag msg = liftIO $ debugM (appName <.> show tag) (T.unpack . T.decodeUtf8 $ msg) |
28 | 29 | ||
29 | setTagLevel :: Priority -> DebugTag -> IO () | 30 | setTagLevel :: Priority -> DebugTag -> IO () |
30 | setTagLevel level tag = updateGlobalLogger (appName <.> show tag) (setLevel level) | 31 | setTagLevel level tag = updateGlobalLogger (appName <.> show tag) (setLevel level) |