Commit ed33ef6d authored by Swann Perarnau's avatar Swann Perarnau

[fix] Fix missing logging changes

The logging improvement patch missed a few calls.
parent d373a502
......@@ -91,11 +91,11 @@ class CommandLineInterface(object):
while(True):
self.upstream_pub_socket.send_json(command)
msg = self.upstream_sub_socket.recv_json()
self.logger.info("new message: %r", msg)
logger.info("new message: %r", msg)
# ignore other messages
if isinstance(msg, dict) and msg.get('type') == 'container':
if msg['event'] == 'list':
self.logger.info("list response: %r", msg)
logger.info("list response: %r", msg)
break
def do_kill(self, argv):
......@@ -111,11 +111,11 @@ class CommandLineInterface(object):
while(True):
self.upstream_pub_socket.send_json(command)
msg = self.upstream_sub_socket.recv_json()
self.logger.info("new message: %r", msg)
logger.info("new message: %r", msg)
# ignore other messages
if isinstance(msg, dict) and msg.get('type') == 'container':
if msg['event'] == 'exit' and msg['uuid'] == argv.uuid:
self.logger.info("container exit: %r", msg)
logger.info("container exit: %r", msg)
break
def do_setpower(self, argv):
......
......@@ -99,7 +99,7 @@ class ContainerManager(object):
"""Kill all the processes of a container."""
if uuid in self.containers:
c = self.containers[uuid]
self.logger.debug("killing %r:", c)
logger.debug("killing %r:", c)
try:
os.kill(c.pid, signal.SIGKILL)
except OSError:
......
......@@ -138,11 +138,11 @@ class Daemon(object):
}
self.upstream_pub.send_json(update)
elif command == 'kill':
self.logger.info("asked to kill container: %r", msg)
logger.info("asked to kill container: %r", msg)
response = self.container_manager.kill(msg['uuid'])
# no update here, as it will trigger child exit
elif command == 'list':
self.logger.info("asked for container list: %r", msg)
logger.info("asked for container list: %r", msg)
response = self.container_manager.list()
update = {'type': 'container',
'event': 'list',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment