Cue / scales

scales - Metrics for Python
Apache License 2.0
920 stars 73 forks source link

Avoid logging at root and prefer debug to info level for code in loops #38

Closed joeschmid closed 9 years ago

joeschmid commented 9 years ago

The current graphite code clutters logs with info level log entries each time it pushes. On top of that, since it logs at the root level there is no way to disable this logging without disabling info level logging for all other code. This PR has two changes:

  1. Log using the module name so that the log level could be configured specifically for this module
  2. Switch from info to debug so that the following lines don't appear in info level logs every 60 seconds:

Graphite pusher is sleeping for 60 seconds Pushing stats to Graphite Done pushing stats to Graphite

Thanks!

PeterScott commented 9 years ago

Looks like this is a popular issue; I just merged https://github.com/Cue/scales/pull/39 which made almost exactly the same changes. :-)

I'll get an updated release on PyPI later today. Thanks!