summaryrefslogtreecommitdiff
path: root/lorrycontroller/workingstate.py
diff options
context:
space:
mode:
Diffstat (limited to 'lorrycontroller/workingstate.py')
-rw-r--r--lorrycontroller/workingstate.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/lorrycontroller/workingstate.py b/lorrycontroller/workingstate.py
index 68d2ef9..f6f8128 100644
--- a/lorrycontroller/workingstate.py
+++ b/lorrycontroller/workingstate.py
@@ -34,7 +34,7 @@ class LorryFileRunner(object):
cmdargs.append(self.lorryfile)
exit, out, err = self.mgr.app.maybe_runcmd(cmdargs)
if exit == 0:
- logging.info("Lorry of %s succeeded: %s" % (self.lorryname, out))
+ logging.debug("Lorry of %s succeeded: %s" % (self.lorryname, out))
else:
logging.warn("Lorry of %s failed: %s" % (self.lorryname, err))
@@ -61,7 +61,8 @@ class WorkingStateManager(object):
self.trove_state_file = os.path.join(self.workdir,
"last-trove-state.json")
if os.path.exists(self.lorry_state_file):
- logging.debug("Loading state file: %s" % self.lorry_state_file)
+ logging.info("Loading lorry state file: %s" %
+ self.lorry_state_file)
with open(self.lorry_state_file, "r") as fh:
self.lorry_state = json.load(fh)
for lorry_name, dct in self.lorry_state.iteritems():
@@ -71,18 +72,19 @@ class WorkingStateManager(object):
self.lorry_state = dict()
if os.path.exists(self.trove_state_file):
- logging.debug("Loading state file: %s" % self.trove_state_file)
+ logging.info("Loading trove state file: %s" %
+ self.trove_state_file)
with open(self.trove_state_file, "r") as fh:
self.trove_state = json.load(fh)
else:
self.trove_state = dict()
def save_state(self):
- logging.debug("Serialising state: %s" % self.lorry_state_file)
+ logging.info("Serialising lorry state: %s" % self.lorry_state_file)
with open(self.lorry_state_file, "w") as fh:
json.dump(self.lorry_state, fh, sort_keys=True, indent=4)
fh.write("\n")
- logging.debug("Serialising state: %s" % self.trove_state_file)
+ logging.info("Serialising trove state: %s" % self.trove_state_file)
with open(self.trove_state_file, "w") as fh:
json.dump(self.trove_state, fh, sort_keys=True, indent=4)
fh.write("\n")