refactor(logger): fix the name of defaultLogger receiver (#1859)

Closes #1858

Co-authored-by: Asim Aslam <asim@aslam.me>
This commit is contained in:
ijayer 2020-07-19 23:55:50 +08:00 committed by GitHub
parent 7f6cefd9c9
commit 5077683b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,12 +160,12 @@ func (l *defaultLogger) Logf(level Level, format string, v ...interface{}) {
fmt.Printf("%s %s %v\n", t, metadata, rec.Message) fmt.Printf("%s %s %v\n", t, metadata, rec.Message)
} }
func (n *defaultLogger) Options() Options { func (l *defaultLogger) Options() Options {
// not guard against options Context values // not guard against options Context values
n.RLock() l.RLock()
opts := n.opts opts := l.opts
opts.Fields = copyFields(n.opts.Fields) opts.Fields = copyFields(l.opts.Fields)
n.RUnlock() l.RUnlock()
return opts return opts
} }