contiv-experimental/volplugin

Cleanup log messages

yuva29 opened this issue · 3 comments

TTL locking messages should be isolated so that it doesn't interwind along with other messages.

Its little confusing to go over the messages in its current state.

time="2016-10-19T21:45:48Z" level=debug msg="Removing Use Lock: &config.UseMount{Volume:\"nfs/v5\", Hostname:\"mon0\", Reason:\"Mount\"}" time="2016-10-19T21:45:48Z" level=warning msg="Could not remove \"Mount\" lock for \"nfs/v5\"" time="2016-10-19T21:45:48Z" level=warning msg="Waiting 100ms for \"Mount\" lock on \"nfs/v5\" to free" time="2016-10-19T21:45:49Z" level=debug msg="Removing Use Lock: &config.UseMount{Volume:\"nfs/v5\", Hostname:\"mon0\", Reason:\"Mount\"}"

erikh commented

set the log level to info.

I would rather see 2 lines of high level message saying

Waiting for lock {Volume:\"nfs/v5\", Hostname:\"mon0\", Reason:\"Mount\"}
Acquiring lock ...

all the other detailed messages should be separated out.

erikh commented

they are. the log level above are "debug" and "warning"

This will give you more info on syslog levels, which are relevant (but not used) here: https://www.google.com/search?client=ubuntu&channel=fs&q=syslog+log+levels&ie=utf-8&oe=utf-8

But essentially, when loglevels are set to info, the warning class of log entry will only show up. debug is enabled right now in the binary.

My point is, all these debug logs are very relevant for testing and evaluating the health of volplugin while allowing us to filter these messages.