diff options
author | Andrew Cady <d@jerkface.net> | 2018-06-19 17:18:30 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2018-06-20 19:48:38 -0400 |
commit | 07ef8d1d2fe204b628e08200a975effc51538163 (patch) | |
tree | dc07258f5585502f9eb8265403b13a8db5677754 /Presence | |
parent | ff1f7c5f2815f81ba7156b409dde5eec87bf41ae (diff) |
route more logging through dput
Diffstat (limited to 'Presence')
-rw-r--r-- | Presence/XMPPServer.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Presence/XMPPServer.hs b/Presence/XMPPServer.hs index ffa02b25..936b2137 100644 --- a/Presence/XMPPServer.hs +++ b/Presence/XMPPServer.hs | |||
@@ -98,6 +98,7 @@ import Data.Void (Void) | |||
98 | import System.Endian (toBE32) | 98 | import System.Endian (toBE32) |
99 | import Control.Applicative | 99 | import Control.Applicative |
100 | import System.IO | 100 | import System.IO |
101 | import DPut | ||
101 | 102 | ||
102 | -- peerport :: PortNumber | 103 | -- peerport :: PortNumber |
103 | -- peerport = 5269 | 104 | -- peerport = 5269 |
@@ -281,10 +282,10 @@ peerKeyToText (ClientKey { localAddress=addr }) = "ErrorClIeNt0" | |||
281 | 282 | ||
282 | 283 | ||
283 | wlog :: String -> IO () | 284 | wlog :: String -> IO () |
284 | wlog s = putStrLn s >> hFlush stdout | 285 | wlog = dput XWLog |
285 | 286 | ||
286 | wlogb :: ByteString -> IO () | 287 | wlogb :: ByteString -> IO () |
287 | wlogb s = Strict8.putStrLn s >> hFlush stdout | 288 | wlogb = wlog . Strict8.unpack |
288 | 289 | ||
289 | flushPassThrough :: Monad m => Conduit a m b -> Conduit (Flush a) m (Flush b) | 290 | flushPassThrough :: Monad m => Conduit a m b -> Conduit (Flush a) m (Flush b) |
290 | flushPassThrough c = getZipConduit $ ZipConduit (onlyChunks =$= mapOutput Chunk c) <* ZipConduit onlyFlushes | 291 | flushPassThrough c = getZipConduit $ ZipConduit (onlyChunks =$= mapOutput Chunk c) <* ZipConduit onlyFlushes |