summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Sanders <nsanders@chromium.org>2017-02-13 18:14:13 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-03-01 05:04:04 -0800
commita1e96d8c00b770fd91f74a8a505a0c5023688d52 (patch)
treece68be0b74d0cef4a11dd97d209672d2bfb73c2b
parent6ceabb07e3ee571437cba34360701b73e83f5516 (diff)
downloadchrome-ec-a1e96d8c00b770fd91f74a8a505a0c5023688d52.tar.gz
ec3po: less chatty debug print
ec3po had very, very chatty debug printing. Reduce some of this so that -d is a bit easier to read. BUG=None BRANCH=None TEST=sudo servod -b electro -d Change-Id: I163e1362dd1e90f374ca3c37e1f1e0aa7fd7a1e2 Reviewed-on: https://chromium-review.googlesource.com/441919 Commit-Ready: Nick Sanders <nsanders@chromium.org> Tested-by: Nick Sanders <nsanders@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rwxr-xr-xutil/ec3po/console.py2
-rw-r--r--util/ec3po/interpreter.py14
2 files changed, 8 insertions, 8 deletions
diff --git a/util/ec3po/console.py b/util/ec3po/console.py
index e5f888af0e..2cc2517582 100755
--- a/util/ec3po/console.py
+++ b/util/ec3po/console.py
@@ -517,7 +517,7 @@ class Console(object):
# Reset the input buffer.
self.input_buffer = ''
self.input_buffer_pos = 0
- self.logger.debug('Reset input buffer.')
+ self.logger.log(1, 'Reset input buffer.')
return
# Keep handling the ESC sequence if we're in the middle of it.
diff --git a/util/ec3po/interpreter.py b/util/ec3po/interpreter.py
index 73123b746a..9a0880f49c 100644
--- a/util/ec3po/interpreter.py
+++ b/util/ec3po/interpreter.py
@@ -133,7 +133,7 @@ class Interpreter(object):
command: A string which contains the command to be sent.
"""
self.ec_cmd_queue.put(command)
- self.logger.debug('Commands now in queue: %d', self.ec_cmd_queue.qsize())
+ self.logger.log(1, 'Commands now in queue: %d', self.ec_cmd_queue.qsize())
# Add the EC UART as an output to be serviced.
if self.connected and self.ec_uart_pty not in self.outputs:
@@ -229,7 +229,7 @@ class Interpreter(object):
return
# Ignore any other commands while in the disconnected state.
- self.logger.debug('command: \'%s\'', command)
+ self.logger.log(1, 'command: \'%s\'', command)
if not self.connected:
self.logger.debug('Ignoring command because currently disconnected.')
return
@@ -300,7 +300,7 @@ class Interpreter(object):
# Send the command.
self.ec_uart_pty.write(cmd)
self.ec_uart_pty.flush()
- self.logger.debug('Sent command to EC.')
+ self.logger.log(1, 'Sent command to EC.')
if self.enhanced_ec and cmd != EC_SYN:
# Now, that we've sent the command, store the current command as the last
@@ -320,10 +320,10 @@ class Interpreter(object):
def HandleECData(self):
"""Handle any debug prints from the EC."""
- self.logger.debug('EC has data')
+ self.logger.log(1, 'EC has data')
# Read what the EC sent us.
data = os.read(self.ec_uart_pty.fileno(), EC_MAX_READ)
- self.logger.debug('got: \'%s\'', binascii.hexlify(data))
+ self.logger.log(1, 'got: \'%s\'', binascii.hexlify(data))
if '&E' in data and self.enhanced_ec:
# We received an error, so we should retry it if possible.
self.logger.warning('Error string found in data.')
@@ -341,12 +341,12 @@ class Interpreter(object):
# Done interrogating.
self.interrogating = False
# For now, just forward everything the EC sends us.
- self.logger.debug('Forwarding to user...')
+ self.logger.log(1, 'Forwarding to user...')
self.dbg_pipe.send(data)
def HandleUserData(self):
"""Handle any incoming commands from the user."""
- self.logger.debug('Command data available. Begin processing.')
+ self.logger.log(1, 'Command data available. Begin processing.')
data = self.cmd_pipe.recv()
# Process the command.
self.ProcessCommand(data)