diff options
author | Valery Piashchynski <[email protected]> | 2020-12-17 03:16:55 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-17 03:16:55 +0300 |
commit | 40cfd9f6b44dfe987bfbf010bf67b32abdc64208 (patch) | |
tree | 10e3c3cd0805619ac30533078eb7d2585877a1b3 /plugins/server | |
parent | 9d5fe4f6a98b30fd73be8259f84fa595ac994a71 (diff) |
Now better
Diffstat (limited to 'plugins/server')
-rw-r--r-- | plugins/server/plugin.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 7c91bbcc..e6003fbc 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/spiral/errors" + "github.com/spiral/roadrunner/v2/interfaces/events" "github.com/spiral/roadrunner/v2/interfaces/log" "github.com/spiral/roadrunner/v2/interfaces/pool" "github.com/spiral/roadrunner/v2/interfaces/server" @@ -169,12 +170,12 @@ func (server *Plugin) setEnv(e server.Env) []string { } func (server *Plugin) collectLogs(event interface{}) { - if we, ok := event.(worker.Event); ok { + if we, ok := event.(events.WorkerEvent); ok { switch we.Event { - case worker.EventWorkerError: - server.log.Error(we.Payload.(error).Error(), "pid", we.Worker.Pid()) - case worker.EventWorkerLog: - server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"), "pid", we.Worker.Pid()) + case events.EventWorkerError: + server.log.Error(we.Payload.(error).Error(), "pid", we.Worker.(worker.BaseProcess).Pid()) + case events.EventWorkerLog: + server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"), "pid", we.Worker.(worker.BaseProcess).Pid()) } } } |