mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-24 22:38:27 +08:00
feat(eventlog) add SetError to EventInProgress
This commit is contained in:
7
thirdparty/eventlog/log.go
vendored
7
thirdparty/eventlog/log.go
vendored
@ -120,6 +120,13 @@ func (eip EventInProgress) Append(l Loggable) {
|
||||
eip.loggables = append(eip.loggables, l)
|
||||
}
|
||||
|
||||
// SetError includes the provided error
|
||||
func (eip EventInProgress) SetError(err error) {
|
||||
eip.loggables = append(eip.loggables, LoggableMap{
|
||||
"error": err.Error(),
|
||||
})
|
||||
}
|
||||
|
||||
// Done creates a new Event entry that includes the duration and appended
|
||||
// loggables.
|
||||
func (eip EventInProgress) Done() {
|
||||
|
Reference in New Issue
Block a user