snapframework/snap-server — pull request #15 by hvr (2011-10-14 08:17:55+00:00)
Title: Make logging more flexible by allowing IO-targets

This changeset could be split in the following parts:

1. Generalize the `Snap.Internal.Http.Server.httpServe` function by
replacing the `Maybe FilePath` logging targets by a more generic
`Maybe (ByteString -> IO ())` action, and decouple from
`System.FastLogger` (except for two remaining helper functions) by
moving the logger construction to the calling code in
`Snap.Http.Server`. Ideally, `Snap.Internal.Http.Server` wouldn't
know anything specific about the concrete `Sytem.FastLogger`, as
that would be configured/glued together in `Snap.Http.Server`.

2. Add a `ConfigLog` data type for configuring the logging type in
the `Config` record (to replace the previous `Maybe FilePath` type),
and adapt all affected code.