Skip to content

Commit

Permalink
self.warning is not a thing. replace it with log_func, as is the fashion
Browse files Browse the repository at this point in the history
in this function
  • Loading branch information
orenmazor committed May 20, 2015
1 parent e8547ce commit ad54919
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions checks.d/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ def _collect_stats(self, key, db, instance_tags, relations, custom_metrics):
continue

if scope in custom_metrics and len(results) > MAX_CUSTOM_RESULTS:
self.warning(
"Query: {0} returned more than {1} results ({2}). Truncating").format(
query, MAX_CUSTOM_RESULTS, len(results))
log_func(
"Query: {0} returned more than {1} results ({2}). Truncating".format(
query, MAX_CUSTOM_RESULTS, len(results)))
results = results[:MAX_CUSTOM_RESULTS]

# FIXME this cramps my style
Expand Down

0 comments on commit ad54919

Please sign in to comment.