Commit Graph

2378 Commits (eae7a751fe27c8a28438adb138ffea6694daf4f3)

Author SHA1 Message Date
Philippe Vaucher eeb22c13bb
Allow customization of syslog_sink (#3124)
Thanks @Silex
1 year ago
Dominik Grabiec c3aed4b683
Add wide character formatting and output support to wincolor_sink. (#3092)
Fixes printing of unicode characters to the windows console such as microsecond suffix for std::chrono types.
1 year ago
gabime 3b4fd93bd0 Updated comment about mdc 1 year ago
gabime 2122eb2194 Update spdlog version to 1.14.1 1 year ago
gabime 22b0f4fc06 Clang format 1 year ago
Gabi Melman 37b847692e Revert pr #3023 (std::string_view overloads for logger accessor for c++17) 1 year ago
gabime 94a8e87c71 Fix #3079 1 year ago
gabime 238c9ffa5d Bump spdlog to version 1.14.0 1 year ago
gabime 3b4c775b5b Update comment about set_default_logger 1 year ago
gabime 3403f27898 Don't remove previous defaullt logger from registry in set_default_logger. Fix #3016 1 year ago
gabime 71925ca382 Revmoed definition of deprecated fmt macros 1 year ago
Gabi Melman b7e0e2c237
Fix #3073 1 year ago
Gabi Melman 1e7d7e0766 Updated bundled fmt to 10.2.1 1 year ago
Gabi Melman 8fed530bdf
Update mdc.h 1 year ago
gabime 1253a57db6 Add mdc support for default format 1 year ago
gabime cba66029e2 Update mdc 1 year ago
Gabi Melman 4517ce8b5c
Update mdc.h 1 year ago
Gabi Melman 1f93017403
Update mdc.h 1 year ago
Gabi Melman f030afe696
Update mdc.h 1 year ago
Gabi Melman 2969dde400 Revert "Updated bundled fmt to 10.2.1"
This reverts commit d8e0ad46bf.
1 year ago
Gabi Melman d8e0ad46bf Updated bundled fmt to 10.2.1 1 year ago
Yubin 6725584e27
Make async_logger::flush() synchronous and wait for the flush to complete (#3049) 1 year ago
Tomas-Zhu 73e2e02b42
Fix #3038 (#3044)
* Fix #3038

* Fix #3038 again

---------

Co-authored-by: Tomas-Zhu <z773922114@gmail.com>
1 year ago
Massimiliano Riva d03eb40c17
Added Mapped Diagnostic Context (MDC) support (#2907)
* Added Mapped Diagnostic Context (MDC) support

* Update include statement

* Optimize string creation

* Fix includes

* Fix padding rules in mdc empty case

* Add comment to describe the use of mdc formatter
1 year ago
gabime 23587b0d9a Fixed regisry-inl.h 1 year ago
gabime 819eb27c5d Use find if registry is bigger than 10 in registry::get(std::string_view logger_name) 1 year ago
gabime 4052bc0621 Use find if registry is bigger than 20 in registry::get(std::string_view logger_name) 1 year ago
magnus-nomono ae525b75c3
Add missing include (#3026) 1 year ago
Alan Candido a45c939040
Update stopwatch.h (#3034)
Adding elapsed time in milliseconds.
1 year ago
Leadbelly 5532231bbc
feature: adds string view overloads for logger accessor (#3023)
Co-authored-by: Ben Leadbetter <ben.leadbetter@native-instruments.com>
2 years ago
Gabi Melman 134f9194bb
Update registry.h code formatting 2 years ago
cohdan fe79bfcc51
Expose the flusher thread object to user in order to allow setting of thread name and thread affinity when needed (#3009)
* Expose the flusher thread object to user in order to allow setting of thread name and thread affinity when needed

* Code review fix - periodic_worker thread getter should return a reference and not a pointer
2 years ago
Dimitri Papadopoulos Orfanos 47b7e7c736
Fix typos found by codespell (#3011) 2 years ago
liubing 8979f7fb2a
Also use _stat() on Windows to be more UTF8 friendly (#2978)
* Also use _stat() on Windows to be more UTF8 friendly

* Cosmetic changes
2 years ago
gabime 7c02e204c9 Bump version to 1.13.0 2 years ago
gabime 2aa8b6c971 Check fd_ is not nullptr in file_helper 2 years ago
Marcus Müller ddce42155e
fmt/*.h: include tweakme.h to set SPDLOG_FMT_EXTERNAL according to system (#2923)
Signed-off-by: Marcus Müller <marcus@hostalia.de>
2 years ago
M010 8b331e2cd1
Fix wrong thread_id (TID) in systemd_sink.h (#2919) 2 years ago
shannonbooth 2d5179ba7d
sinks: Make syslog_sink.h's syslog_prio_from_level protected (#2918)
To allow for using this function from a derived sink.
2 years ago
Keith Kraus 0c4fb032e4
Match SPDLOG_CONSTEXPR_FUNC to FMT_CONSTEXPR (#2901)
* Modify the condition of SPDLOG_CONSTEXPR_FUNC to match that of fmt
2 years ago
Peter Nemeth 479a5ac3f1
Fix OS availability check of pthread_threadid_np for iOS (#2897) 2 years ago
gabime e5865186d4 Revert "Added a function to add callbacks that are called when a logger is registered (#2883)"
This reverts commit b6eeb7364c, since it causes deadlocks too easily for the users.
2 years ago
Jonathan Vannier b6eeb7364c
Added a function to add callbacks that are called when a logger is registered (#2883)
* Added a function to add callbacks that are called when a logger is registered

* Fix non captured registration 2 not being properly tested for

* Replace std::list by std::vector

* Remove const refs to shared pointers

* Fix missing header
2 years ago
gabime 0a53eafe18 update clang format again 2 years ago
gabime 4b2a8219d5 reformat code 2 years ago
gabime 9d52261185 clang format 2 years ago
gabime 95c226e9c9 format 2 years ago
Gabi Melman 5931a3d6f8 Fixed windows compile 2 years ago
Gabi Melman f4afd81ce6
Update common.h 2 years ago
gabime 1a0bfc7a89 clang format 2 years ago
gabime f24f7fa2fa Added missing include mutex 2 years ago
Gabi Melman b9cb721b92
Update async_logger-inl.h 2 years ago
Gabi Melman 1d6dbc2a56
Fix code formatting of async_logger-inl.h 2 years ago
Yubin b5b5043d42
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.
2 years ago
gabime d109e1dcd0 minor cleanup 2 years ago
gabime a98d3ab0c7 clang format 2 years ago
neothenil 8014d6c31a
Fix encoding issue in qt_sinks (#2862)
Added support for utf8 in qt_color_sink
2 years ago
mike cedfeeb95f
Add SPDLOG_TO_VERSION to compare spdlog version (#2853)
You can use SPDLOG_VERSION to select the latest spdlog features
where available while falling back to older implementations otherwise.
Using SPDLOG_TO_VERSION() for the value to compare with is recommended.
for Example:
```c++
 void sink_it_(const details::log_msg &msg) override
 {
 #if SPDLOG_VERSION < SPDLOG_TO_VERSION(1,4,0)
     fmt::memory_buffer formatted;
 #else
     memory_buf_t formatted;
 #endif
     sinks::base_sink<Mutex>::formatter_->format(msg, formatted);
     // bala bala...
 }
```
2 years ago
gabime bffceb90b0 Fixed circular_q size impl and added tests 2 years ago
Gabi Melman d8d23a6606
Fix #2820 2 years ago
qwark 76dfc7e7c0
Qt Sink : Allow for darker colors (for light background). (#2817)
Default are too bright if background is light(white).
2 years ago
gabime bed324e414 Formatted qt_sinks.h code 2 years ago
gabime 72a7ec3eb9 Bumped spdlog version to 1.12.0 2 years ago
gabime 4338b9cd23 Revert "Updated bundled fmt to version 10.0.0"
This reverts commit 62e55e7a7f.
2 years ago
Lucas Rangit MAGASWERAN 01b3724c48
sinks: android: handle when message is not loggable (#2801)
Android logger (since API 30) checks the per-tag property `log.tag.<tag>` to determine if a log message is loggable. See https://developer.android.com/ndk/reference/group/logging#__android_log_is_loggable . For example, `__android_log_buf_write` for a VERBOSE message will call `__android_log_is_loggable` and return `-EPERM` if the log message will not be printed because `log.tag.<tag>` is set to `INFO`.

Instead of erroring with the following error message, the Android sink should handle `-EPERM`. It is not an error to disable a log via the run-time property.

```
[*** LOG ERROR #0001 ***] [2023-06-29 00:50:26] [logcat] logging to Android failed: Unknown error -1 [/path/to/file.cpp(123)]
```
2 years ago
gabime 4b8ff51a29 Added const to put_newline() in bin_to_hex.h 2 years ago
Gabi Melman 8b8bc20f30
Added const qualifier to bin_hex_formatter to support c++20 2 years ago
gabime 3cd06a3d40 Added const qualifier to stopwatch formatter to support c++20 2 years ago
gabime 169f827957 Added missing include to udp_client.h 2 years ago
gabime 62e55e7a7f Updated bundled fmt to version 10.0.0 2 years ago
gabime b85c509ec6 Fixed clang warning in qt_sinks.h 2 years ago
gabime b1eb4953fa Cleaned some warnings in qt_sinks 2 years ago
Simon-Janos 5ece88e5a8
Removing IPv4 limitation from tcp_client (#2790) 2 years ago
Jiang Y 326f8870c2
Update qt_sinks.h: narrow cast msg.color_range_start, msg.color_range_end (#2781) 2 years ago
gabime da1e671d42 Clean qt_color_sink 2 years ago
gabime 9ce7295191 Make max_line explicit for qt_color_sink 2 years ago
gabime ca44ce50ab Cleaned qt_color_sink 2 years ago
gabime 91280df07e wip color_qt_sink 2 years ago
Gabi Melman 4f4da7f114
Revert qt_sinks changes and color support, since they are not thread safe 2 years ago
Gabi Melman 199cc0a6d8
Update qt_sinks.h 2 years ago
Gabi Melman 4fb4e2bd86
Update qt_sinks.h 2 years ago
Gabi Melman c17b5d9cd1
Update qt_sinks.h 2 years ago
Gabi Melman 3a7188505f
Added lock to qt_color_sink 2 years ago
gabime 1f61f5e019 clang format 2 years ago
gabime 31cefdce79 Use at() in ansicolor_sink 2 years ago
gabime 95b8ee9b32 Remove comment in qt_sinks.h 2 years ago
gabime d7985e3965 Update comment about qt_color_sink 2 years ago
gabime dfcb74b129 Added default color handling to qt_color_sink 2 years ago
gabime 6a96c7f902 Added qt_color_sink 2 years ago
gabime 6940f4fd46 Added some comments to qt_sinks.h 2 years ago
gabime 1f1897e3a4 Clean qt_sink code 2 years ago
gabime 0f50ad92d6 Clean qt_sink code 2 years ago
gabime 5384512f25 Store MetaMethod object in qt_sink for better performance 2 years ago
gabime 230cad163d Fixed qt_sink 2 years ago
Gabi Melman 3a6ee663ba
Update qt_sinks.h 2 years ago
Gabi Melman 931cd2fb54
Update qt_sinks.h 2 years ago
Gabi Melman 8fdcf0365b
Update qt_sinks.h 2 years ago
Ulmo-F 32701af60b
qt_sink: add some warning on its usage (#2753)
* qt_sink: add some warning on its usage

* qt_sink: add some warning on its usage - fix

---------

Co-authored-by: Benoit FANCHON <bfanchon@nanoxplore.com>
2 years ago
Gabi Melman 31cf79a70d
Remov foreward to standard vformat_to 2 years ago
Eli Boyarski 62a4b8ce4e
Fix fmt build (#2744) 2 years ago