Commit Graph

4154 Commits (8360c8ae7e96f31ee0eb27f64922c1c55c81f70c)
 

Author SHA1 Message Date
Alex Denisov 8360c8ae7e fix: attr<T> constructor breaks on types that don't support std::to_string 3 years ago
Bailey Chittle 5c9bd58c41 Merge branch 'v1.x' into ts_attributes 3 years ago
Bailey Chittle 60aea8d9e4 custom tessonics readme 3 years ago
Zeus James da14258533
Fix MinGW build issue on example (#2642)
* Fix MinGW build issue on example #2638

* Move the cmake change to example\CMakeLists.txt

* Update CMakeLists.txt on the example
3 years ago
Li Z 927cc29444
Fix unexpected delimiter at start of line in to_hex formatter (#2627) 3 years ago
Bailey Chittle 7aa0cedaa0 exception safety tests 3 years ago
Gabi Melman 5a589438d2
Update README.md 3 years ago
Gabi Melman d8c061aa6e
Update README.md 3 years ago
Mohammad Ali 3cab260814
Add a trivial callback sink (#2610)
Add a trivial callback sink
3 years ago
Bailey Chittle d1b28bfc79
attribute testing (#3)
* 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
3 years ago
Bailey Chittle 6097b84f85 Merge branch 'v1.x' into attributes 3 years ago
Bailey Chittle 47076c9a4c Merge branch 'v1.x' into attributes 3 years ago
Gabi Melman 654dbc5c32
Update os.h 3 years ago
Gabi Melman 78e86ba01f
Update os-inl.h 3 years ago
Gabi Melman 435827fe5a
Update os.h 3 years ago
espkk f29f369a12
Add sync to file_helper (#2343) 3 years ago
albert-github 5a63426d1c
Spelling corrections (#2606)
Spelling corrections v1.x
3 years ago
Bailey Chittle d6ed2f2aae global contextual logger support 3 years ago
Bailey Chittle 71d2e3de3d broke the utf8 code by accident 3 years ago
Bailey Chittle d6d4c65af5
contextual logger attributes (#2)
* 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>
3 years ago
Bailey Chittle e7c2186dc6 keep old range-based for loop for non-attribute code 3 years ago
Bailey Chittle 26a04ad484
Merge pull request #1 from bachittle/attr_format
attribute formatting
3 years ago
Gabi Melman 05e3a73b16
Update README.md 3 years ago
Gabi Melman c92d12bc18
Update README.md 3 years ago
Bailey Chittle 0b48d79fff fixed example to include new pattern formatting 3 years ago
Bailey Chittle 3383207ef5 default kv pairs 3 years ago
Bailey Chittle 82e4553e03 changed switch statement due to an interesting bug I found 3 years ago
Bailey Chittle 3aba11dfa0 fixed reordering error 3 years ago
Bailey Chittle cbdcb3e30f Merge branch 'attributes' into attr_format 3 years ago
Bailey Chittle 785c3a5b0f custom pattern formatting is now functional 3 years ago
Bailey Chittle be3e571b03 another pedantic error in ci 3 years ago
Bailey Chittle 7f2439439c actually for sure fixed the -Werror=conversion, for the specific version of gcc 3 years ago
Bailey Chittle 78830148db experimenting with attribute formatting 3 years ago
Bailey Chittle 8f2d273c3f fixed errors caused by -Werror=conversion 3 years ago
Bailey Chittle 59da466e57 code breaks when fmt is external, so am using fmts implementation only 3 years ago
Robin Lindén 6df64c6c34
Fix -Wshadow warnings in spdlog::sinks::dist_sink (#2599)
This is similar to fbba6dff20 but fixes a
few member functions missed in that commit.
3 years ago
Arnar Bjarni Arnarson 0b9ff5210a
Fix type of event id in win_eventlog_sink (#2598)
Co-authored-by: Arnar Bjarni Arnarson <arnar@menandmice.com>
3 years ago
Ivan Grokhotkov 85a009ad64
Support newlib C library configurations without tm_gmtoff field (#2600)
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.
3 years ago
Bailey Chittle d8647064b6 more endpoints, removed commas from logfmt 3 years ago
Bailey Chittle 8516010805 C++11 backwards compat fixes by replacing std::string_view with built-in string_view_t 3 years ago
Bailey Chittle b33301d214 more well-defined definition of list instantiation using a pre-defined type 3 years ago
Bailey Chittle f5bde10533 Merge remote-tracking branch 'origin/v1.x' into attributes 3 years ago
Khem Raj 287a00d364
Do not use LFS64 functions on linux/musl (#2589)
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>
3 years ago
Vasiliy Kulikov 3c93f7690a
fix build: fix for freebsd (#2590)
The build error was:
  include/spdlog/details/tcp_client.h:106:31: error: use of undeclared identifier 'IPPROTO_TCP'
3 years ago
Alok Priyadarshi a4e9917575
feat(mpmc_blocking_q): add blocking dequeue without timeout (#2588)
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>
3 years ago
Bailey Chittle 882cee1285 scrambling key and value to escape ascii codes 3 years ago
Bailey Chittle be5cc44bbf fixed bugs with default formatting 3 years ago
Bailey Chittle 2d79f7a1b3 multiple kv pairs can be passed via initializer list 3 years ago
Bailey Chittle 98958cf765 attributes can simulate structured logging, show example. Now works with pattern_formatter 3 years ago
Bailey Chittle 6c16b6ce5c attribute example for testing purposes 3 years ago