logging: first outlet receives logger error message

Abandons stderr special-casing:

* looks weird on shell and IO redirection to same file because of
interleaving of stdout and stderr
* better than a separate dedicated outlet because it does not require
additional configuration

fixes #28

BREAK SEMANTICS CONFIG
This commit is contained in:
Christian Schwarz
2017-11-17 00:24:22 +01:00
parent a7f70a566d
commit 2bfcfa5be8
5 changed files with 31 additions and 29 deletions

View File

@ -17,13 +17,13 @@ const DefaultUserFieldCapacity = 5
type Logger struct {
fields Fields
outlets *Outlets
outlets Outlets
outletTimeout time.Duration
mtx *sync.Mutex
}
func NewLogger(outlets *Outlets, outletTimeout time.Duration) *Logger {
func NewLogger(outlets Outlets, outletTimeout time.Duration) *Logger {
return &Logger{
make(Fields, DefaultUserFieldCapacity),
outlets,