diff options
author | Valery Piashchynski <[email protected]> | 2021-05-13 20:15:00 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-13 20:15:00 +0300 |
commit | e1ff9daead5033b537296ffb071e551b95af91ab (patch) | |
tree | c3755967c7c40a05f12d81d1f7043ccc0bc3da0c /plugins/service/process.go | |
parent | 705b69631dc91323c64a19594dcfeca06ea4fa5a (diff) | |
parent | 1dd0db287da4106d99578338ea252004def788a9 (diff) |
#671 fix(static): revert static pluginv2.2.1
#671 fix(static): revert static plugin
Diffstat (limited to 'plugins/service/process.go')
-rw-r--r-- | plugins/service/process.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/plugins/service/process.go b/plugins/service/process.go index 49219eb0..cac5c41e 100644 --- a/plugins/service/process.go +++ b/plugins/service/process.go @@ -7,10 +7,10 @@ import ( "sync/atomic" "syscall" "time" - "unsafe" "github.com/spiral/errors" "github.com/spiral/roadrunner/v2/plugins/logger" + "github.com/spiral/roadrunner/v2/utils" ) // Process structure contains an information about process, restart information, log, errors, etc @@ -50,7 +50,7 @@ func NewServiceProcess(restartAfterExit bool, execTimeout time.Duration, restart // write message to the log (stderr) func (p *Process) Write(b []byte) (int, error) { - p.log.Info(toString(b)) + p.log.Info(utils.AsString(b)) return len(b), nil } @@ -145,9 +145,3 @@ func (p *Process) execHandler() { p.Unlock() } } - -// unsafe and fast []byte to string convert -//go:inline -func toString(data []byte) string { - return *(*string)(unsafe.Pointer(&data)) -} |