Skip to content

Commit

Permalink
Merge pull request #2410 from sopel-irc/irc-logger-conn-check
Browse files Browse the repository at this point in the history
logger: use newer, more robust IRC connection check
  • Loading branch information
dgw authored Feb 19, 2023
2 parents 56f79b8 + d6b4231 commit 43e9b2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sopel/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def emit(self, record):
:param record: the log record to output
:type record: :class:`logging.LogRecord`
"""
if self._bot.backend is None or not self._bot.backend.is_connected():
# Don't emit logs when the bot is not connected.
if not self._bot.connection_registered:
# Don't emit logs to IRC when the bot is not connected & registered.
return

try:
Expand Down

0 comments on commit 43e9b2a

Please sign in to comment.