summaryrefslogtreecommitdiff
path: root/cmd/rr
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-03 16:00:14 +0300
committerWolfy-J <[email protected]>2019-05-03 16:00:14 +0300
commit588b53dec2eb27be5ce04616954cfca5b4145817 (patch)
tree45fbdebc58313dfbeeb999ff979fc5373dda51fa /cmd/rr
parent28c787d66c2b74dd2300c792abd1e4f987c3d6c9 (diff)
new watchers functionality
Diffstat (limited to 'cmd/rr')
-rw-r--r--cmd/rr/cmd/root.go12
1 files changed, 7 insertions, 5 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)
+ })
+ }
}
})
}