From b509a97a8a7a188e034e188cb82a882c01f82547 Mon Sep 17 00:00:00 2001 From: BreadTube Date: Wed, 27 May 2026 16:53:10 +0900 Subject: [PATCH] Better logging message * Minor change in init message --- breadtube_bot/bot.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/breadtube_bot/bot.py b/breadtube_bot/bot.py index f11310c..8912013 100644 --- a/breadtube_bot/bot.py +++ b/breadtube_bot/bot.py @@ -33,8 +33,8 @@ class BotCommand(StrEnum): class Bot: DEFAULT_MESSAGE_LIST_LIMIT: int = 50 INIT_MESSAGE: str = ( - 'Bot initialized.\nThis is the current configuration used.\n' - 'You can upload a new one to update the configuration.\n' + 'Bot initialized.\n' + 'You can upload new `config.txt` or `subscriptions.csv` to update them.\n' f"Available commands: {', '.join(['`' + c.value + '`' for c in BotCommand if c != BotCommand.UNKNOWN])}") MAX_DOWNLOAD_SIZE: int = 50_000 YT_CHANNEL_NAME_URL = 'https://www.youtube.com/@' @@ -575,12 +575,15 @@ class Bot: try: self._refresh_sub(yt_connection, sub_info, channel_dict, category_ranges) except RuntimeError as error: - self.logger.error('Refreshing subscription %s failed: %s', sub_info.channel_id, error) + self.logger.error('Refreshing subscription %s (%s) failed: %s', sub_info.name, sub_info.channel_id, + error) except TimeoutError as error: - self.logger.error('Timeout error refreshing subcription: %s', error) + self.logger.error( + 'Timeout error refreshing subcription %s (%s): %s', sub_info.name, sub_info.channel_id, error) break except Exception as error: - self.logger.error('Refreshing subscription %s unexpectedly failed: %s', sub_info.channel_id, error) + self.logger.error('Refreshing subscription %s (%s) unexpectedly failed: %s', sub_info.name, + sub_info.channel_id, error) break yt_connection.close() self.logger.info('Subs refreshed')