Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Fix for #474 to print plugin-type as a string in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffanyfay committed Nov 5, 2015
1 parent 599374f commit 6d59d08
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions control/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,13 @@ func (r *runner) HandleGomitEvent(e gomit.Event) {
if pool != nil {
pool.kill(v.Id, "plugin dead")
}

case *control_event.PluginUnsubscriptionEvent:
runnerLog.WithFields(log.Fields{
"_block": "subscribe-pool",
"event": v.Namespace(),
"plugin-name": v.PluginName,
"plugin-version": v.PluginVersion,
"plugin-type": v.PluginType,
"plugin-type": core.PluginType(v.PluginType).String(),
}).Debug("handling plugin unsubscription event")

err := r.handleUnsubscription(core.PluginType(v.PluginType).String(), v.PluginName, v.PluginVersion, v.TaskId)
Expand All @@ -285,7 +284,7 @@ func (r *runner) HandleGomitEvent(e gomit.Event) {
"event": v.Namespace(),
"plugin-name": v.Name,
"plugin-version": v.Version,
"plugin-type": v.Type,
"plugin-type": core.PluginType(v.Type).String(),
"plugin-signed": v.Signed,
}).Info("pool has bad key ", key)
continue
Expand All @@ -308,7 +307,7 @@ func (r *runner) HandleGomitEvent(e gomit.Event) {
"event": v.Namespace(),
"plugin-name": v.Name,
"plugin-version": v.Version,
"plugin-type": v.Type,
"plugin-type": core.PluginType(v.Type).String(),
}).Info("No previous pool found for loaded plugin")
return
}
Expand All @@ -328,7 +327,7 @@ func (r *runner) HandleGomitEvent(e gomit.Event) {
"event": v.Namespace(),
"plugin-name": v.Name,
"plugin-version": v.Version,
"plugin-type": v.Type,
"plugin-type": core.PluginType(v.Type).String(),
}).Info("pool with subscriptions to move found")
for _, sub := range subs {
r.emitter.Emit(&control_event.PluginSubscriptionEvent{
Expand Down

0 comments on commit 6d59d08

Please sign in to comment.