Commit 0e60e9ff authored by Kirill Smelkov's avatar Kirill Smelkov

X wcfs: Don't noise ZWatcher trace logs with "select ..."

Its just a debugging print - helpful to debug zwatcher, but not helpful
to understand which events the system was observing.
parent 3f84a1e2
...@@ -757,10 +757,15 @@ func (head *Head) zheadUnlock() { head.zheadMu.Unlock() } ...@@ -757,10 +757,15 @@ func (head *Head) zheadUnlock() { head.zheadMu.Unlock() }
// -------- 4) ZODB invalidation -> OS cache -------- // -------- 4) ZODB invalidation -> OS cache --------
func traceZWatch(format string, argv ...interface{}) { func traceZWatch(format string, argv ...interface{}) {
if !log.V(1) { // XXX -> 2? if !log.V(1) {
return
}
log.InfoDepth(1, fmt.Sprintf("zwatcher: " + format, argv...))
}
func debugZWatch(format string, argv ...interface{}) {
if !log.V(2) {
return return
} }
log.InfoDepth(1, fmt.Sprintf("zwatcher: " + format, argv...)) log.InfoDepth(1, fmt.Sprintf("zwatcher: " + format, argv...))
} }
...@@ -775,7 +780,7 @@ func (root *Root) zwatcher(ctx context.Context, zwatchq chan zodb.Event) (err er ...@@ -775,7 +780,7 @@ func (root *Root) zwatcher(ctx context.Context, zwatchq chan zodb.Event) (err er
var ok bool var ok bool
for { for {
traceZWatch("select ...") debugZWatch("select ...")
select { select {
case <-ctx.Done(): case <-ctx.Done():
traceZWatch("cancel") traceZWatch("cancel")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment