tags:

views:

68

answers:

1

I'm using Network.Browser 4000.0.9 to retrieve a web page:

import Network.Browser
import Network.HTTP

main =
  do
    (uri, response) <- browse $ do
      setAllowRedirects True
      setDebugLog Nothing
      request $ getRequest "http://www.google.com/robots.txt"
    putStrLn "done"

Despite setDebugLog Nothing this spews all of this logging:

Sending:
GET /robots.txt HTTP/1.1
Host: www.google.com
User-Agent: ...
Content-Length: 0


Creating new connection to www.google.com
Received:
HTTP/1.1 200 OK
Content-Type: text/plain
...

How do I turn this logging off?

+2  A: 

Use setOutHandler and setErrHandler as described in the documentation page you linked.

rkhayrov
Thanks. Slightly embarrassed... I should RTFM.
Dominic Cooney