diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-12 18:40:48 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-12 18:40:48 +0400 |
commit | 3a4b33c0a526c958c447ce6820b0ba11fb0a7c4c (patch) | |
tree | aaa5d8abead54477da7f66afcfec8d176e12ae55 /src/Network/BitTorrent | |
parent | dde56b9e13a66fc96b553d81e5a8bc09d6d9306f (diff) |
Enable logging in simpleClient function
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r-- | src/Network/BitTorrent/Client.hs | 7 |
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 | ||
37 | import Control.Exception | 37 | import Control.Exception |
38 | import Control.Concurrent | 38 | import Control.Concurrent |
39 | import Control.Monad.Logger | ||
39 | import Control.Monad.Trans.Resource | 40 | import Control.Monad.Trans.Resource |
40 | 41 | ||
41 | import Data.Default | 42 | import 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 | -- |
119 | simpleClient :: BitTorrent () -> IO () | 120 | simpleClient :: BitTorrent () -> IO () |
120 | simpleClient m = withClient def logger (`runBitTorrent` m) | 121 | simpleClient m = do |
121 | where | 122 | runStderrLoggingT $ LoggingT $ \ logger -> do |
122 | logger _ _ _ _ = return () \ No newline at end of file | 123 | withClient def logger (`runBitTorrent` m) |