I have a simple hello world happstack app:
module Main where
import Happstack.Server (nullConf, simpleHTTP, toResponse, ok)
main :: IO ()
main = simpleHTTP nullConf $ ok "Hello, World!"
I want it to log requests to stdout.
I found this http://happstack.wordpress.com/2009/02/26/happstack-now-outputs-apache-combined-logs/ which says it is outputting logs, but they are not going to stdout. I've never used hslogger before and am having trouble figuring how to a) configure it, and b) wire it into happstack. nullConf
provides a default logMAccess
, but it isn't clear how that ends up in hslogger.
Just after I posted I found this: http://www.haskell.org/pipermail/beginners/2011-August/008184.html which gave me the clue I needed.