summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-03-30 13:38:24 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-03-30 13:38:24 -0400
commita9eb5c16471c3b34e9e89ac1eea3b5bb50478c3e (patch)
tree0e66df3c28e174a31f84fefad6b15694ed478928
parentcb770fdfebb4d196c45cbff524715fd5d1d8a0a5 (diff)
downloadbcfg2-a9eb5c16471c3b34e9e89ac1eea3b5bb50478c3e.tar.gz
bcfg2-a9eb5c16471c3b34e9e89ac1eea3b5bb50478c3e.tar.bz2
bcfg2-a9eb5c16471c3b34e9e89ac1eea3b5bb50478c3e.zip
Use self.log.info() instead of 'print' to produce stats for
'bcfg2-admin reports purge' to make purge honor -q flag.
-rw-r--r--src/lib/Server/Admin/Reports.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/Server/Admin/Reports.py b/src/lib/Server/Admin/Reports.py
index a4dd19064..2a4c13c9c 100644
--- a/src/lib/Server/Admin/Reports.py
+++ b/src/lib/Server/Admin/Reports.py
@@ -59,12 +59,16 @@ def printStats(fn):
fn(*data)
- print "Clients removed: %s" % (start_client - Client.objects.count())
- print "Interactions removed: %s" % (start_i - Interaction.objects.count())
- print "Interactions->Entries removed: %s" % \
- (start_ei - Entries_interactions.objects.count())
- print "Metrics removed: %s" % (start_perf - Performance.objects.count())
- print "Ping metrics removed: %s" % (start_ping - Ping.objects.count())
+ self.log.info("Clients removed: %s" %
+ (start_client - Client.objects.count()))
+ self.log.info("Interactions removed: %s" %
+ (start_i - Interaction.objects.count()))
+ self.log.info("Interactions->Entries removed: %s" %
+ (start_ei - Entries_interactions.objects.count()))
+ self.log.info("Metrics removed: %s" %
+ (start_perf - Performance.objects.count()))
+ self.log.info("Ping metrics removed: %s" %
+ (start_ping - Ping.objects.count()))
return print_stats