diff options
author | Valery Piashchynski <[email protected]> | 2021-02-03 23:35:38 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-02-03 23:35:38 +0300 |
commit | f48602882cf3f7ab8f7bbecde0fc63ad3e0f29a6 (patch) | |
tree | 1970a2fc891341996f65e7dce848b894de23568b /plugins | |
parent | abb14e082cf5d0c2380a81587211512dbd78bcf0 (diff) |
Tests update
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/server/plugin.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 18a3a316..99d93d19 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -234,12 +234,12 @@ func (server *Plugin) collectEvents(event interface{}) { if we, ok := event.(events.WorkerEvent); ok { switch we.Event { case events.EventWorkerError: - server.log.Error(we.Payload.(error).Error(), "pid", we.Worker.(worker.BaseProcess).Pid()) - case events.EventWorkerStderr: - // TODO unsafe byte to string convertation - server.log.Debug("worker stderr", "pid", we.Worker.(worker.BaseProcess).Pid(), "message", string(we.Payload.([]byte))) + server.log.Error(strings.TrimRight(we.Payload.(error).Error(), " \n\t")) case events.EventWorkerLog: - server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"), "pid", we.Worker.(worker.BaseProcess).Pid()) + server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) + case events.EventWorkerStderr: + // TODO unsafe byte to string convert + server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) } } } @@ -248,12 +248,12 @@ func (server *Plugin) collectWorkerLogs(event interface{}) { if we, ok := event.(events.WorkerEvent); ok { switch we.Event { case events.EventWorkerError: - server.log.Error(we.Payload.(error).Error(), "pid", we.Worker.(worker.BaseProcess).Pid()) + server.log.Error(strings.TrimRight(we.Payload.(error).Error(), " \n\t")) case events.EventWorkerLog: - server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"), "pid", we.Worker.(worker.BaseProcess).Pid()) + server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) case events.EventWorkerStderr: - // TODO unsafe byte to string convertation - server.log.Debug("worker stderr", "pid", we.Worker.(worker.BaseProcess).Pid(), "message", string(we.Payload.([]byte))) + // TODO unsafe byte to string convert + server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) } } } |