Closed 3ear closed 9 months ago
hello, thank you for reporting issues, I will look into it tonight
I have tested this and it is working as it should.
Here in readme is explained how the buffering works. https://github.com/matobodo/DiscordWebhookLogging?tab=readme-ov-file#flushing-buffered-messages
If you need further assistance, I'm happy to help. If you still have issues, please provide me with your environment setup, OS, Python version, etc.
finally got a chance to look further into the implementation. The intention is to store messages until the buffer is full and then send it all? That seems like poor functionality for a logger. I expected a timer that would be used to bunch messages for sending them for rate limits as opposed to just raw char counts
This functionality was good enough for me when using it in my project. The buffer was implemented to group more log messages into single discord message to prevent hitting the discord api rate limiting.
The timer is a great suggestion. As already stated in another issue, the handler needs to be reworked so it works asynchronously to prevent locking threads that call logging methods and with this change I can also add timer that will send the buffered messages eg. every 5 seconds.
That would be great, especially if it is configurable at init.
I've just now created an issue for this, #5.
title