8000 Lack of visibility into specific connection details on failure · Issue #2427 · sopel-irc/sopel · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Lack of visibility into specific connection details on failure #2427
Open
@dgw

Description

@dgw

Sopel has never been great about logging what IP it's trying to connect, though it used to log at least the host and port in 7.x:

LOGGER.info('Connecting to %s:%s...', host, port)

As of 8.0-dev, with the asyncio rewrite, not even that much gets logged.

sopel/sopel/irc/backends.py

Lines 389 to 407 in 8b098bf

# open connection
try:
self._reader, self._writer = await asyncio.open_connection(
**self.get_connection_kwargs(),
)
except ssl.SSLError:
LOGGER.exception('Unable to connect due to SSL error.')
# tell the bot to quit without restart
self.bot.hasquit = True
self.bot.wantsrestart = False
return
except Exception:
LOGGER.exception('Unable to connect.')
# until there is a way to prevent an infinite loop of connection
# error and reconnect, we have to tell the bot to quit here
# TODO: prevent infinite connection failure loop
self.bot.hasquit = True
self.bot.wantsrestart = False
return

I s(o)pelunked the code path from there through asyncio and ssl in CPython, and didn't find any logging calls we could tweak Sopel's log handlers to catch. I have a feeling that getting something useful will be a bit involved and it's awfully late in the 8.0 cycle to start on this. Milestoned for 8.1, optimistically.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0