feat(eventlog) add SetError to EventInProgress
Brian Tiger Chow committed
Jan 29, 2015 at 00:44 UTC
1dd1e7339b15402f15008c4ae5ea65e81ac3b9c9
1 file changed
+7
thirdparty/eventlog/log.go
+7
@@ -120,6 +120,13 @@ func (eip EventInProgress) Append(l Loggable) {
120
eip.loggables = append(eip.loggables, l)
121
}
122
123
+// SetError includes the provided error
124
+func (eip EventInProgress) SetError(err error) {
125
+ eip.loggables = append(eip.loggables, LoggableMap{
126
+ "error": err.Error(),
127
+ })
128
+}
129
+
130
// Done creates a new Event entry that includes the duration and appended
131
// loggables.
132
func (eip EventInProgress) Done() {