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.
Use the new blocking dequeue to avoid unnecessarily waking up the
thread pool every 10s.
Fixes#2587 by replacing std::condition_variable::wait_for with
std::condition_variable::wait as a workaroung for gcc 11.3 issue 101978.
Co-authored-by: Alok Priyadarshi <alokp@dexterity.ai>
* Support compile-time format string checking with std::format
* Fix pre-VS 17.5 compilation
* Fix compilation without wchar_t support
* What am I doing
* Bring back fmt optimization
* Move to_string_view to common.h
* Fix SPDLOG_CONSTEXPR_FUNC emitting duplicate symbol errors when building in C++11
* Also add inline on VS 2013
* Appender doesn't work on wide strings
The "windows.h" in MinGW-W64 is lower-case. When cross-compiling for
Windows on Linux with a case-sensitive file system, the upper-case
"Windows.h" file is not found and compilation fails.
Always use lower-case "windows.h" to fix cross-compilation.
There are some timing shenanigans with GCC's chrono that make this
unreliable. Add a start/stop and test for that to work around.
Signed-off-by: Rosen Penev <rosenp@gmail.com>