Problem
The BotLogger creates a log directory and appends logs to files, but does not handle write failures (such as insufficient permissions or disk full). This might cause unhandled exceptions or loss of error information when logging fails.
Steps to Reproduce
- Make the logs directory unwritable or fill the disk.
- Start the bot and trigger events that log messages.
- Observe whether unhandled exceptions are thrown or errors are reported.
Expected Behavior
Logger should gracefully handle file write failures and emit clear alerts rather than crashing or silently swallowing log messages.
Suggested Fix
- Add try/catch around log file writes and report errors more robustly.