aboutsummaryrefslogtreecommitdiffstats
path: root/lib/agent/events.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-08 10:19:54 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-08 10:19:54 +0100
commit02aec942b44eecd2ea9b311bb4ba2d60cce21e9a (patch)
treed5243e01ffaba8f23c86c9660eb1f7c0765d4dd8 /lib/agent/events.go
parentd96e5b59d352f1c9eaf73a13d5c4bc25c6a4ebc4 (diff)
Fixed events definition and callback processing.
Diffstat (limited to 'lib/agent/events.go')
-rw-r--r--lib/agent/events.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/agent/events.go b/lib/agent/events.go
index 046c377..2684ff5 100644
--- a/lib/agent/events.go
+++ b/lib/agent/events.go
@@ -104,8 +104,9 @@ func (e *Events) Emit(evName string, data interface{}) error {
Type: evName,
Data: data,
}
- if err := (*so).Emit(apiv1.EventTypePrefix+evName, msg); err != nil {
- e.Log.Errorf("WS Emit %v error : %v", apiv1.EventTypePrefix+evName, err)
+ e.Log.Debugf("Emit Event %s: %v", evName, sid)
+ if err := (*so).Emit(evName, msg); err != nil {
+ e.Log.Errorf("WS Emit %v error : %v", evName, err)
if firstErr == nil {
firstErr = err
}