forked from erlang-lager/lager
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement configurable error_logger msg drop threshold
Implement a new config option error_logger_hwm, which is a number representing how many messages per second we should log from the error_logger. If that threshold is exceeded, messages will be discarded for the remainder of that second. This is only effective if lager itself can process the messages fast enough to satisfy the threshold. If your threshold is 1000 and lager itself is only writing 100 messages a second (because error messages are causing fsyncs or whatever) you'll never exceed the threshold and drops will never happen. Thus care needs to be taken when selecting this feature. Setting it low is not as bad as it might seem, because when using lager, hopefully error_logger messages are unusual. In my testing, 50/second with the default config seemed reasonable (which has 2 file backends installed, both of which fsync on messages at error or above).
- Loading branch information
Showing
2 changed files
with
84 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters