diff options
author | Wolfy-J <[email protected]> | 2021-01-07 16:44:51 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2021-01-07 16:44:51 +0300 |
commit | a838194b99c329f1ffd0272e99445a406e3c39cc (patch) | |
tree | 97df8e39d856ceb4a06c4ebb7c103b86c2ec7c07 | |
parent | 984953a9db1d94817bda2e3d9266583151b1b437 (diff) |
- fixes bug when pool does not propagate events to given listeners
-rw-r--r-- | plugins/logger/plugin.go | 2 | ||||
-rw-r--r-- | plugins/server/plugin.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/logger/plugin.go b/plugins/logger/plugin.go index 01bf5cc0..1031643a 100644 --- a/plugins/logger/plugin.go +++ b/plugins/logger/plugin.go @@ -63,7 +63,7 @@ func (z *ZapLogger) ServiceLogger(n endure.Named) (Logger, error) { // Provides declares factory methods. func (z *ZapLogger) Provides() []interface{} { return []interface{}{ + //z.DefaultLogger, z.ServiceLogger, - z.DefaultLogger, } } diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 5d1f26d3..613d84ed 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -131,8 +131,8 @@ func (server *Plugin) NewWorkerPool(ctx context.Context, opt poolImpl.Config, en return nil, errors.E(op, err) } - list := make([]events.Listener, 0, len(listeners)) - list = append(list, server.collectPoolLogs) + list := make([]events.Listener, 0, len(listeners)+1) + list = append(listeners, server.collectPoolLogs) p, err := poolImpl.Initialize(ctx, spawnCmd, server.factory, opt, poolImpl.AddListeners(list...)) if err != nil { |