Dalamud
Dalamud copied to clipboard
Feature request: Warn user of very large log file
We had a user come into goat place recently about a third party plugin misbehaving and spamming the log file, filling up their C drive. While it's not our duty to fix third party plugins, I do think we should implement measures to detect if the log file is at an unwieldly size (e.g. if it reaches >10mb), and to post a chat message or something else to warn the user.
Another justification for this beyond "filling up user's hard drives is kind of bad" is that XL/Dalamud will refuse to start if the drive is full, so if the user has low disk space remaining, this can temporarily break XL/Dalamud.
Since this would be an advanced feature, it might make sense to allow the following in 'developer options':
- Configuration option for how many lines/minute are allowed by each plugin.
- Use a token bucket method to acquire the 'right' to log lines. Refresh buckets on a timer.
- Choose an 'action' level for bucket exhaustion. 3a) 'IGNORE' = current behavior. 3b) 'WARN' = current behavior + a popup about what plugin is misbehaving (DEFAULT) 3c) 'DENY' = disallow the log message until more tokens are available.
I would have been able to troubleshoot the problem myself given the presence of a warning. Knowing penumbra was a problem would have saved the dev team all the troubleshooting time they spent on me :)