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)
}
func (n *defaultLogger) Options() Options {
func (l *defaultLogger) Options() Options {
// not guard against options Context values
n.RLock()
opts := n.opts
opts.Fields = copyFields(n.opts.Fields)
n.RUnlock()
l.RLock()
opts := l.opts
opts.Fields = copyFields(l.opts.Fields)
l.RUnlock()
return opts
}