mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-26 23:53:19 +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)
|
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
|
// Done creates a new Event entry that includes the duration and appended
|
||||||
// loggables.
|
// loggables.
|
||||||
func (eip EventInProgress) Done() {
|
func (eip EventInProgress) Done() {
|
||||||
|
Reference in New Issue
Block a user