diff --git a/HaskellNet-SSL.cabal b/HaskellNet-SSL.cabal
--- a/HaskellNet-SSL.cabal
+++ b/HaskellNet-SSL.cabal
@@ -1,6 +1,6 @@
 name:                HaskellNet-SSL
 synopsis:            Helpers to connect to SSL/TLS mail servers with HaskellNet
-version:             0.2.4
+version:             0.2.5
 description:         This package ties together the HaskellNet and connection
                      packages to make it easy to open IMAP and SMTP connections
                      over SSL.
diff --git a/src/Network/HaskellNet/SSL.hs b/src/Network/HaskellNet/SSL.hs
--- a/src/Network/HaskellNet/SSL.hs
+++ b/src/Network/HaskellNet/SSL.hs
@@ -8,10 +8,12 @@
 data Settings = Settings
               { sslPort          :: PortNumber
               , sslMaxLineLength :: Int
+              , sslLogToConsole  :: Bool
               }
 
 defaultSettingsWithPort :: PortNumber -> Settings
 defaultSettingsWithPort p = Settings
   { sslPort = p
   , sslMaxLineLength = 10000
+  , sslLogToConsole = False
   }
diff --git a/src/Network/HaskellNet/SSL/Internal.hs b/src/Network/HaskellNet/SSL/Internal.hs
--- a/src/Network/HaskellNet/SSL/Internal.hs
+++ b/src/Network/HaskellNet/SSL/Internal.hs
@@ -3,7 +3,6 @@
   , connectPlain
   ) where
 
-
 import Network.Connection
 import Network.HaskellNet.SSL
 import Network.HaskellNet.BSStream
@@ -11,6 +10,8 @@
 import qualified Data.ByteString.Char8 as B
 import Data.Default
 
+import Control.Monad ((>=>))
+
 type STARTTLS = IO ()
 
 connectionGetBytes :: Connection -> Int -> IO B.ByteString
@@ -21,13 +22,20 @@
 
 connectionToStream :: Connection -> Settings -> BSStream
 connectionToStream c cfg = BSStream
-  { bsGet = connectionGetBytes c
-  , bsPut = connectionPut c
+  { bsGet = connectionGetBytes c >=> withLog "RECV"
+  , bsPut = withLog "SEND" >=> connectionPut c
   , bsFlush = return ()
   , bsClose = connectionClose c
   , bsIsOpen = return True
-  , bsGetLine = connectionGetLine maxl c
+  , bsGetLine = connectionGetLine maxl c >>= withLog "RECV"
   } where maxl = sslMaxLineLength cfg
+          withLog = if sslLogToConsole cfg then logToConsole
+                                           else flip (const . return)
+
+logToConsole :: String -> B.ByteString -> IO B.ByteString
+logToConsole dir s = do
+    putStrLn $ "HaskellNet-SSL " ++ dir ++ ": " ++ show s
+    return s
 
 connectSSL :: String -> Settings -> IO BSStream
 connectSSL hostname cfg = do
