forked from mirror/logrus
return new entry for Entry.WithContext
This commit is contained in:
parent
aefd7ecb90
commit
38bc297a3d
3
entry.go
3
entry.go
|
@ -103,8 +103,7 @@ func (entry *Entry) WithError(err error) *Entry {
|
||||||
|
|
||||||
// Add a context to the Entry.
|
// Add a context to the Entry.
|
||||||
func (entry *Entry) WithContext(ctx context.Context) *Entry {
|
func (entry *Entry) WithContext(ctx context.Context) *Entry {
|
||||||
entry.Context = ctx
|
return &Entry{Logger: entry.Logger, Data: entry.Data, Time: entry.Time, err: entry.err, Context: ctx}
|
||||||
return entry
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a single field to the Entry.
|
// Add a single field to the Entry.
|
||||||
|
|
Loading…
Reference in New Issue