Sirupsen/logrus — pull request #45 by aybabtme (2014-07-15 22:45:23+00:00)
Title: Export package func to a standard logger.

This introduces package exported funcs, as discussed in https://github.com/Sirupsen/logrus/issues/41.

In addition to the func listed in #41, I've created funcs to setup the standard logger, alike to the [`log`](http://golang.org/pkg/log/#SetPrefix) ones:

* `SetOutput`
* `SetFormatter`
* `SetLevel`
* `AddHook`

Unlike the `log` package, there is no way to [_retrieve_](http://golang.org/pkg/log/#Prefix) those settings back.

**Breaks the API**: the constants for `Level` were named the same way as the exported funcs. Balancing the pros/cons:

- The package funcs will be used more often in user code, so should have a nice, clean name. This is less true for the `Level` constants, which are used pretty much only in custom `Hooks` and when initializing a logger.
- This will break all the custom `Hook` that people might have made.
- This will break all the logger instantiations that people have.
- Perhaps different names could be found for the package exported funcs, but I couldn't think of any that would keep the intent clear.

Since this breaks the API, I'm not sure how you want to handle this.