diff --git a/sopel/logger.py b/sopel/logger.py index 9750020a9..bcac65a24 100644 --- a/sopel/logger.py +++ b/sopel/logger.py @@ -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: