op/go-logging — pull request #13 by alecthomas (2014-06-26 01:12:10+00:00)
Title: RFC: Add support for %{shortfile} and %{longfile}.

This PR adds support for %{shortfile} and %{longfile} formatting verbs, mirroring the built in logging modules Lshortfile and Llongfile flags, respectively.

Unfortunately, because the calldepth has to be passed through Format(), it is a breaking API change. I could make it non-breaking by adding a separate FormatterWithCallDepth interface like so:

```go
type FormatterWithCallDepth interface {
Formatter
Format(calldepth int, r *Record, w io.Writer) error
}
```

Then doing a type cast. I didn't do this initially because a) it will be slower and b) I think it's fairly unlikely people have implemented their own formatters.