diff --git a/README.md b/README.md index a4f1e9e..c06f2f1 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ A simple non-puppeting bridge between Matrix and Discord written in Python. } ``` +* Logs are saved to the `bot.log` file in `$PWD`. + * Normal Discord bot functionality like commands can be added to the bot via [cogs](https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html), example [here](https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be). * Replace `guild.emojis` with `self.discord_client.emojis` (`Callbacks()`, `process_message()`) to make the Discord bot use emojis from ALL it's guilds. diff --git a/main.py b/main.py index 301d28c..4f343c2 100644 --- a/main.py +++ b/main.py @@ -524,7 +524,13 @@ class Callbacks(object): async def main(): - logging.basicConfig(level=logging.INFO) + logging.basicConfig( + level=logging.INFO, + handlers=[ + logging.FileHandler("bot.log"), + logging.StreamHandler() + ] + ) retry = 2