From 860659fd8ed5d395fe37a3a603bb240c9f89e324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Gla=C3=9F?= Date: Fri, 2 Jan 2026 23:26:46 +0100 Subject: [PATCH] birthday --- src/birthday.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/birthday.py b/src/birthday.py index 00cb642..48136bf 100644 --- a/src/birthday.py +++ b/src/birthday.py @@ -48,6 +48,7 @@ class BirthdayClient(Client): await self.channel.send(f'Heute hat {name} ({member.mention}) Geburtstag! Seid nett :birthday: :tada:') def parse_birthdays(self) -> TextChannel: + logging.info('Reading file from %s', self.config_file) with open(self.config_file) as fh: config = BirthdayConfig.model_validate_json(fh.read()) guild = self.get_guild(config.channel.server_id) @@ -65,6 +66,7 @@ def main() -> None: intents.message_content = intents.members = intents.messages = True log_handler = logging.FileHandler(filename='fregbot-birthday.log', encoding='utf-8', mode='w') + log_handler.setLevel(logging.DEBUG) client = BirthdayClient(intents=intents) client.config_file = Path(os.getenv('FREG_BIRTHDAY_CONFIG') or '') @@ -76,7 +78,7 @@ def main() -> None: if not token: logging.error('Kein Token gefunden. Kann nicht starten. Umgebungsvariable FREG_TOKEN muss gesetzt sein') exit(1) - client.run(token, log_handler=log_handler) + client.run(token, log_handler=log_handler, root_logger=True) if __name__ == '__main__':