summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Strauss <david@fourkitchens.com>2009-11-05 08:55:56 +0000
committerDavid Strauss <david@fourkitchens.com>2009-11-05 08:55:56 +0000
commit20cb6440cab5b691bb8f5a9c76d26fe715c85113 (patch)
tree66d0de58bda606bfdb2eee14249bd86385589f89
parentfd293dd3e12421f4dfcb39cd72ac8c42987a6cd7 (diff)
downloadbcfg2-20cb6440cab5b691bb8f5a9c76d26fe715c85113.tar.gz
bcfg2-20cb6440cab5b691bb8f5a9c76d26fe715c85113.tar.bz2
bcfg2-20cb6440cab5b691bb8f5a9c76d26fe715c85113.zip
Use proper logging for snapshot storage time.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5538 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Plugins/Snapshots.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Snapshots.py b/src/lib/Server/Plugins/Snapshots.py
index c4802a9c3..b71f085d9 100644
--- a/src/lib/Server/Plugins/Snapshots.py
+++ b/src/lib/Server/Plugins/Snapshots.py
@@ -1,15 +1,19 @@
#import lxml.etree
+import logging
import binascii
import difflib
#import sqlalchemy
#import sqlalchemy.orm
import Bcfg2.Server.Plugin
import Bcfg2.Server.Snapshots
+import Bcfg2.Logger
from Bcfg2.Server.Snapshots.model import Snapshot
import Queue
import time
import threading
+logger = logging.getLogger('Snapshots')
+
ftypes = ['ConfigFile', 'SymLink', 'Directory']
datafields = {'Package': ['version'],
'Service': ['status'],
@@ -118,5 +122,5 @@ class Snapshots(Bcfg2.Server.Plugin.Statistics,
self.session.add(snap)
self.session.commit()
t3 = time.time()
- print "Storage took", t3-t2
+ logger.info("Snapshot storage took %fs" % (t3-t2))
return True