* initial testing of attributes
* updating test cases for new api
* more testing, fixing bugs found
* fixed unused error
* errors might be caused due to passing pointers by reference, these simple pointer passes should be by value
* my only other idea for getting this to work. will experiment
* fixing tests before merge (#4)
* my only other idea for getting this to work. will experiment
* I think I fixed the thread issue, lets see...
* unused lambda capture acting funny
* see if its the context that is causing issues
* unused warning... again
* reverting to basic, see where the issue is in github actions (testing most of it locally)
* this works again?
* some diff cleanup before squash merging
* cleaner search for stop iterator
* init fixed attribute, currently having issues with the factory
* using the much simpler api already defined: no factory, just define the sinks yourself
* async logger fixed attribute support
* fixed missing fixed attributes in default log calls
* forgot some spots, all cases were found?
* potential fix for illegal vector iterators
* kept up to date with attributes branch
* cleaner fixed logger api
* less function overloads, just add and remove context when needed
* fixed example to use new api
* added append function for nested context
* pushing and popping contexts for nested loggers
* fixed error due to implicit conversion
* fixed sign conversion error
* better attribute example with optional json example
Co-authored-by: Bailey Chittle <baileyc@tessonics.com>
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>