spf13/jWalterWeatherman — pull request #2 by elwinar (2014-11-30 14:47:21+00:00)
Title: Reworked to enable instantiation

I reworked JWW into a simple `Notepad` structure that
more or less handle all the job by itself.

The old interface of JWW is almost conserved, using a `Notepad` created
in the `init()` and whose `loggers` are linked to exported vars, and
relinked when changes occurs. I'm not really satisfied by this solution,
but it's simple and efficient, and leave the external API clean.

There is one API break, that is to take a `io.Writer` instead of a path for
the log output. I feel it simpler and it evacuate the need to check for
errors in the lib, and enable the end-user to do some really cool things
quite simply (like logging to a database, etc).

I also enabled the user to choose flags and an optional prefix, like the
original `log.Logger` struct… it is useful to distinguish two Notepad's
outputs.