Since most of our projects will use the same handler duo and apply the
config options the same way, let's make our lives easier and add a
default handler constructor.
This commit adds config options so that users can for both the console
logger and the file logger set the following things:
- disable the logger
- omit timestamps from log lines.
Start using the new slog handlers. With this commit we also remove the
need for the LogWriter since we let our LogRotator implement io.Writer
and pass that in to our log file handler.
This commit then also adds an implementation of the btclog.Handler
interface called `handlerSets` which basically lets us have a Handler
backed by many Handlers (we need one for the stdout and one for our log
file).
These are two separate concerns. So this commit splits them up and just
passes a LogWriter from the one to the other. This will become cleaner
in an upcoming commit where the Rotator will implement io.Writer and
there will no longer be a need for LogWriter.
As is customary when preparing for the next major (or minor) release, we
bump the version to .99 to allow us to set the minimum required version
to something like v0.18.4-beta in lndclient and it would still accept
the master branch (even if that target version hasn't been
released/tagged yet).
In this commit, we bump the version of the master branch to v0.17.99.
This reflects the fact that master will be a super set of all the minor
releases until v0.18, and will also include changes towards v0.18.
In this commit, we bump the version of the master branch to v0.16.99.
This reflects the fact that master will be a super set of all the minor
releases until v0.17, and will also include changes towards v0.17.
Because a tag for RC4 was previously pushed but without bumping the
version first, we need to skip RC4 as we can't replace already pushed
git tags without causing issues.
Since `go1.18` the runtime has a package that provides information about module
versions, version control information, and build flags embedded in executable
files built by the go command.
The new packages allows us to get information needed by the `version` command
without having to rely on `ldflags` set at build time.
This can be really helpful while debugging errors from people using custom
binaries. For example a build from master.
We forgot to do this after 0.15 was tagged, but usually we use a x.99
version to indicate that the commits in master are between releases.
This might also make it easier to help identify exactly which version a
user is running in issue reports.
[skip-ci]