* Fix stdout_sink_base::log's behavior inconsistency
It will flush every time when it if not defined _WIN32, but not in
Windows family.
We viewed the commit #48d4ed9 for fixing issue #1675 .
It seems missing this flushing operation in mistake.
* Use fflush at all operating system
* Remove redundant fflush from stdout_sink_base
---------
Co-authored-by: scc <scc@teamt5.org>
This method applies levels which is set by environment variable
`SPDLOG_LEVEL` to the a single controller. Usefull for loading
configuration into manually created loggers.
From the systemd.journal-fields the TID is a user defined
field passed directly from the clients and stored in the
journal. Adding the arguement in the journal send to support
that storage option in the journal.
Newlib C library (https://sourceware.org/newlib/) has a configuration
option to add tm_gmtoff field to the tm structure. Not all the
platforms supported by newlib enable this option, and spdlog doesn't
compile on such platforms due to missing tm_gmtoff field.
Fix this by checking for `__NEWLIB__` and `__TM_GMTOFF` and enabling
calculate_gmt_offset.
On musl, off_t is 64bit always ( even on 32bit platforms ), therefore
using LFS64 funcitons is not needed on such platforms. Moreover, musl
has stopped providing aliases for these functions [1] which means it
wont compile on newer musl systems. Therefore only use it on 32bit
glibc/linux platforms and exclude musl like cygwin or OSX
[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
Signed-off-by: Khem Raj <raj.khem@gmail.com>
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>