rcrowley/go-tigertonic — pull request #67 by slimmy (2014-05-18 01:14:28+00:00)
Title: Customlogger

PR to make the (JSON)logging a little bit more versatile. This lets you log to stdout, files etc by supplying your own logger instead of having JSONLogged create one for you.

I often find myself wanting to log to both stdout and a persisted log file, using io.MultiWriter.

```go
logWriter := io.MultiWriter(os.Stdout, myLogFileHandle)
multiLogger := log.New(logWriter, "prefix", 0)
tigertonic.JSONLogged(handler, redactor, multiLogger)
```

If this PR gets accepted I will create pull requests for tigertonic.Logged and tigertonic.ApacheLogged with the same changes.