tone down the packet logging
This commit is contained in:
Robey Pointer 2006-01-30 10:20:53 -08:00
parent 3596251856
commit eeb76522ea
1 changed files with 4 additions and 2 deletions

View File

@ -267,11 +267,12 @@ class Packetizer (object):
cmd_name = MSG_NAMES[cmd] cmd_name = MSG_NAMES[cmd]
else: else:
cmd_name = '$%x' % cmd cmd_name = '$%x' % cmd
self._log(DEBUG, 'Write packet <%s>, length %d' % (cmd_name, len(data))) orig_len = len(data)
if self.__compress_engine_out is not None: if self.__compress_engine_out is not None:
data = self.__compress_engine_out(data) data = self.__compress_engine_out(data)
packet = self._build_packet(data) packet = self._build_packet(data)
if self.__dump_packets: if self.__dump_packets:
self._log(DEBUG, 'Write packet <%s>, length %d' % (cmd_name, orig_len))
self._log(DEBUG, util.format_binary(packet, 'OUT: ')) self._log(DEBUG, util.format_binary(packet, 'OUT: '))
self.__write_lock.acquire() self.__write_lock.acquire()
try: try:
@ -369,7 +370,8 @@ class Packetizer (object):
cmd_name = MSG_NAMES[cmd] cmd_name = MSG_NAMES[cmd]
else: else:
cmd_name = '$%x' % cmd cmd_name = '$%x' % cmd
self._log(DEBUG, 'Read packet <%s>, length %d' % (cmd_name, len(payload))) if self.__dump_packets:
self._log(DEBUG, 'Read packet <%s>, length %d' % (cmd_name, len(payload)))
return cmd, msg return cmd, msg