summaryrefslogtreecommitdiff
path: root/Presence
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2018-06-19 17:18:30 -0400
committerAndrew Cady <d@jerkface.net>2018-06-20 19:48:38 -0400
commit07ef8d1d2fe204b628e08200a975effc51538163 (patch)
treedc07258f5585502f9eb8265403b13a8db5677754 /Presence
parentff1f7c5f2815f81ba7156b409dde5eec87bf41ae (diff)
route more logging through dput
Diffstat (limited to 'Presence')
-rw-r--r--Presence/XMPPServer.hs5
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)
98import System.Endian (toBE32) 98import System.Endian (toBE32)
99import Control.Applicative 99import Control.Applicative
100import System.IO 100import System.IO
101import 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
283wlog :: String -> IO () 284wlog :: String -> IO ()
284wlog s = putStrLn s >> hFlush stdout 285wlog = dput XWLog
285 286
286wlogb :: ByteString -> IO () 287wlogb :: ByteString -> IO ()
287wlogb s = Strict8.putStrLn s >> hFlush stdout 288wlogb = wlog . Strict8.unpack
288 289
289flushPassThrough :: Monad m => Conduit a m b -> Conduit (Flush a) m (Flush b) 290flushPassThrough :: Monad m => Conduit a m b -> Conduit (Flush a) m (Flush b)
290flushPassThrough c = getZipConduit $ ZipConduit (onlyChunks =$= mapOutput Chunk c) <* ZipConduit onlyFlushes 291flushPassThrough c = getZipConduit $ ZipConduit (onlyChunks =$= mapOutput Chunk c) <* ZipConduit onlyFlushes