diff options
author | Wolfy-J <[email protected]> | 2019-05-03 16:00:14 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-05-03 16:00:14 +0300 |
commit | 588b53dec2eb27be5ce04616954cfca5b4145817 (patch) | |
tree | 45fbdebc58313dfbeeb999ff979fc5373dda51fa /cmd | |
parent | 28c787d66c2b74dd2300c792abd1e4f987c3d6c9 (diff) |
new watchers functionality
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/rr/cmd/root.go | 12 | ||||
-rw-r--r-- | cmd/util/debug.go | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/cmd/rr/cmd/root.go b/cmd/rr/cmd/root.go index 2e170307..1222177a 100644 --- a/cmd/rr/cmd/root.go +++ b/cmd/rr/cmd/root.go @@ -109,11 +109,13 @@ func init() { } // global watcher config - wcv, _ := Container.Get(watcher.ID) - if wcv, ok := wcv.(*watcher.Service); ok { - wcv.AddListener(func(event int, ctx interface{}) { - util.LogEvent(Logger, event, ctx) - }) + if Verbose { + wcv, _ := Container.Get(watcher.ID) + if wcv, ok := wcv.(*watcher.Service); ok { + wcv.AddListener(func(event int, ctx interface{}) { + util.LogEvent(Logger, event, ctx) + }) + } } }) } diff --git a/cmd/util/debug.go b/cmd/util/debug.go index 54ef104f..01082112 100644 --- a/cmd/util/debug.go +++ b/cmd/util/debug.go @@ -71,7 +71,7 @@ func LogEvent(logger *logrus.Logger, event int, ctx interface{}) bool { case watcher.EventMaxMemory: w := ctx.(roadrunner.WorkerError) - logger.Warning(Sprintf( + logger.Error(Sprintf( "<white+hb>worker.%v</reset> <red>%s</reset>", *w.Worker.Pid, w.Caused, |