racker/virgo — pull request #102 by pquerna (2012-06-13 19:56:41+00:00)
Title: Tune logging

* Add `logging.set_level` and `logging.get_level`
* Add `-d` flag to agent to show debug logs
* Default the log level to `INFO`.
* Move many log messages from `INFO` to `DEBUG`

Example run:

$ sudo ./monitoring-agent -z monitoring.zip -c ./rackspace-monitoring-agent.cfg
Wed Jun 13 19:56:11 2012 INF: Log file started (path=(null))
Wed Jun 13 19:56:11 2012 INF: found endpoint: collector-lon-78-136-44-6.monitoring.rackspacecloud.com:443
Wed Jun 13 19:56:11 2012 INF: found endpoint: collector-ord-50-57-61-9.monitoring.rackspacecloud.com:443
Wed Jun 13 19:56:11 2012 INF: collector-ord-50-57-61-9.monitoring.rackspacecloud.com:443 -> Connected
Wed Jun 13 19:56:12 2012 INF: collector-ord-50-57-61-9.monitoring.rackspacecloud.com:443 -> Connection has been authenticated to collector-ord-50-57-61-9.monitoring.rackspacecloud.com:443
Wed Jun 13 19:56:12 2012 INF: collector-lon-78-136-44-6.monitoring.rackspacecloud.com:443 -> Connected
Wed Jun 13 19:56:12 2012 INF: collector-ord-50-57-61-9.monitoring.rackspacecloud.com:443 -> Created Check: agent.cpu (id=chd1UQacyj, period=30s)
Wed Jun 13 19:56:13 2012 INF: collector-lon-78-136-44-6.monitoring.rackspacecloud.com:443 -> Connection has been authenticated to collector-lon-78-136-44-6.monitoring.rackspacecloud.com:443