Support async_overflow_policy::discard_new (#2876)

Reason for the discard_new policy: when there is an overflow, there
is usually some unexpected issue (a bug, or some other unexpected stuff).
And in case of unexpected issue, the first arrived log messages are usually
more important than subsequent ones. For example, some application
keep logging error messages in case of functionality failure, which,
when using async_overflow_policy::overrun_oldest, will overrun the
first arrived messages that may contain real reason for the failure.
This commit is contained in:
Yubin
2023-09-10 04:05:08 +08:00
committed by GitHub
parent d109e1dcd0
commit b5b5043d42
6 changed files with 94 additions and 4 deletions

1
.gitignore vendored
View File

@@ -72,6 +72,7 @@ install_manifest.txt
/tests/logs/*
spdlogConfig.cmake
spdlogConfigVersion.cmake
compile_commands.json
# idea
.idea/