From 07ef8d1d2fe204b628e08200a975effc51538163 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Tue, 19 Jun 2018 17:18:30 -0400 Subject: route more logging through dput --- Presence/XMPPServer.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Presence') 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) import System.Endian (toBE32) import Control.Applicative import System.IO +import DPut -- peerport :: PortNumber -- peerport = 5269 @@ -281,10 +282,10 @@ peerKeyToText (ClientKey { localAddress=addr }) = "ErrorClIeNt0" wlog :: String -> IO () -wlog s = putStrLn s >> hFlush stdout +wlog = dput XWLog wlogb :: ByteString -> IO () -wlogb s = Strict8.putStrLn s >> hFlush stdout +wlogb = wlog . Strict8.unpack flushPassThrough :: Monad m => Conduit a m b -> Conduit (Flush a) m (Flush b) flushPassThrough c = getZipConduit $ ZipConduit (onlyChunks =$= mapOutput Chunk c) <* ZipConduit onlyFlushes -- cgit v1.2.3