Commit b70bef7f authored by Guido van Rossum's avatar Guido van Rossum

Use the zrpc.log module's log() method so the process identity is

logged with the message_output.
parent 3b4b2508
...@@ -13,14 +13,16 @@ ...@@ -13,14 +13,16 @@
############################################################################## ##############################################################################
"""Sized message async connections """Sized message async connections
$Id: smac.py,v 1.27 2002/09/16 16:57:11 gvanrossum Exp $ $Id: smac.py,v 1.28 2002/09/27 19:14:16 gvanrossum Exp $
""" """
import asyncore, struct import asyncore, struct
from ZEO.Exceptions import Disconnected from ZEO.Exceptions import Disconnected
from zLOG import LOG, TRACE, ERROR, INFO, BLATHER import zLOG
from types import StringType from types import StringType
from ZEO.zrpc.log import log
import socket, errno import socket, errno
# Use the dictionary to make sure we get the minimum number of errno # Use the dictionary to make sure we get the minimum number of errno
...@@ -60,7 +62,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher): ...@@ -60,7 +62,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
if debug is not None: if debug is not None:
self._debug = debug self._debug = debug
elif not hasattr(self, '_debug'): elif not hasattr(self, '_debug'):
self._debug = __debug__ and 'smac' self._debug = __debug__
self.__state = None self.__state = None
self.__inp = None # None, a single String, or a list self.__inp = None # None, a single String, or a list
self.__input_len = 0 self.__input_len = 0
...@@ -179,7 +181,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher): ...@@ -179,7 +181,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
m = message[:40]+' ...' m = message[:40]+' ...'
else: else:
m = message m = message
LOG(self._debug, TRACE, 'message_output %s' % `m`) log('smac message_output %s' % `m`, level=zLOG.TRACE)
if self.__closed: if self.__closed:
raise Disconnected, ( raise Disconnected, (
......
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