Suppress accept_connection2 asyncio log spew
This commit is contained in:
parent
931b227618
commit
12c49bbe75
@ -29,6 +29,7 @@ class ServerBase(object):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
SUPPRESS_MESSAGE_REGEX = re.compile('SSH handshake')
|
SUPPRESS_MESSAGE_REGEX = re.compile('SSH handshake')
|
||||||
|
SUPPRESS_TASK_REGEX = re.compile('accept_connection2')
|
||||||
PYTHON_MIN_VERSION = (3, 6)
|
PYTHON_MIN_VERSION = (3, 6)
|
||||||
|
|
||||||
def __init__(self, env):
|
def __init__(self, env):
|
||||||
@ -68,6 +69,8 @@ class ServerBase(object):
|
|||||||
message = context.get('message')
|
message = context.get('message')
|
||||||
if message and self.SUPPRESS_MESSAGE_REGEX.match(message):
|
if message and self.SUPPRESS_MESSAGE_REGEX.match(message):
|
||||||
return
|
return
|
||||||
|
if self.SUPPRESS_TASK_REGEX.match(repr(context.get('task'))):
|
||||||
|
return
|
||||||
loop.default_exception_handler(context)
|
loop.default_exception_handler(context)
|
||||||
|
|
||||||
async def _main(self, loop):
|
async def _main(self, loop):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user