summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-12 18:40:48 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-12 18:40:48 +0400
commit3a4b33c0a526c958c447ce6820b0ba11fb0a7c4c (patch)
treeaaa5d8abead54477da7f66afcfec8d176e12ae55 /src/Network/BitTorrent
parentdde56b9e13a66fc96b553d81e5a8bc09d6d9306f (diff)
Enable logging in simpleClient function
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/Client.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Client.hs b/src/Network/BitTorrent/Client.hs
index 255c4dec..c6b4901a 100644
--- a/src/Network/BitTorrent/Client.hs
+++ b/src/Network/BitTorrent/Client.hs
@@ -36,6 +36,7 @@ module Network.BitTorrent.Client
36 36
37import Control.Exception 37import Control.Exception
38import Control.Concurrent 38import Control.Concurrent
39import Control.Monad.Logger
39import Control.Monad.Trans.Resource 40import Control.Monad.Trans.Resource
40 41
41import Data.Default 42import Data.Default
@@ -117,6 +118,6 @@ withClient opts lf action = bracket (newClient opts lf) closeClient action
117-- For testing purposes only. 118-- For testing purposes only.
118-- 119--
119simpleClient :: BitTorrent () -> IO () 120simpleClient :: BitTorrent () -> IO ()
120simpleClient m = withClient def logger (`runBitTorrent` m) 121simpleClient m = do
121 where 122 runStderrLoggingT $ LoggingT $ \ logger -> do
122 logger _ _ _ _ = return () \ No newline at end of file 123 withClient def logger (`runBitTorrent` m)