From f56584b7450ec7d746e7ff5bbaae9dd9158ec859 Mon Sep 17 00:00:00 2001 From: flifloo Date: Sat, 28 Mar 2020 14:07:30 +0100 Subject: [PATCH] Better extension log message --- extensions/backup.py | 12 ++++++------ extensions/help.py | 12 ++++++------ extensions/restore.py | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/extensions/backup.py b/extensions/backup.py index 2b69cc8..111f53e 100644 --- a/extensions/backup.py +++ b/extensions/backup.py @@ -63,23 +63,23 @@ async def backup_cmd(ctx: commands.Context): def setup(bot: commands.Bot): - logger.info(f"Loading of {extension_name} extension") + logger.info(f"Loading...") if not isdir("backup"): logger.info(f"Create backup folder") mkdir("backup") try: bot.add_command(backup_cmd) except Exception as e: - logger.error(f"Error loading extension {extension_name}: {e}") + logger.error(f"Error loading: {e}") else: - logger.info(f"Extension {extension_name} load successful") + logger.info(f"Load successful") def teardown(bot: commands.Bot): - logger.info(f"Unloading of {extension_name} extension") + logger.info(f"Unloading...") try: bot.remove_command("backup") except Exception as e: - logger.error(f"Error unloading extension {extension_name}: {e}") + logger.error(f"Error unloading: {e}") else: - logger.info(f"Extension {extension_name} unload successful") + logger.info(f"Unload successful") diff --git a/extensions/help.py b/extensions/help.py index 2ff28e5..2bdfa86 100644 --- a/extensions/help.py +++ b/extensions/help.py @@ -12,21 +12,21 @@ async def help_cmd(ctx): def setup(bot): - logger.info(f"Loading of {extension_name} extension") + logger.info(f"Loading...") try: bot.help_command = None bot.add_command(help_cmd) except Exception as e: - logger.error(f"Error loading extension {extension_name}: {e}") + logger.error(f"Error loading: {e}") else: - logger.info(f"Extension {extension_name} load successful") + logger.info(f"Load successful") def teardown(bot): - logger.info(f"Unloading of {extension_name} extension") + logger.info(f"Unloading...") try: bot.remove_command("help") except Exception as e: - logger.error(f"Error unloading extension {extension_name}: {e}") + logger.error(f"Error unloading: {e}") else: - logger.info(f"Extension {extension_name} unload successful") + logger.info(f"Unload successful") diff --git a/extensions/restore.py b/extensions/restore.py index 643f3ca..c1c0d4b 100644 --- a/extensions/restore.py +++ b/extensions/restore.py @@ -74,23 +74,23 @@ async def restore_cmd(ctx: commands.Context): def setup(bot: commands.Bot): - logger.info(f"Loading of {extension_name} extension") + logger.info(f"Loading...") if not isdir("backup"): logger.info(f"Create backup folder") mkdir("backup") try: bot.add_command(restore_cmd) except Exception as e: - logger.error(f"Error loading extension {extension_name}: {e}") + logger.error(f"Error loading: {e}") else: - logger.info(f"Extension {extension_name} load successful") + logger.info(f"Load successful") def teardown(bot: commands.Bot): - logger.info(f"Unloading of {extension_name} extension") + logger.info(f"Unloading...") try: bot.remove_command("restore") except Exception as e: - logger.error(f"Error unloading extension {extension_name}: {e}") + logger.error(f"Error unloading: {e}") else: - logger.info(f"Extension {extension_name} unload successful") + logger.info(f"Unload successful")