Commit Graph

2460 Commits (08c727e4f8aa6955a0b14a26e83fb06fe9caeace)

Author SHA1 Message Date
gabime 4bb3b56102 relative includes wip 2 years ago
gabime 967554e4c5 added comments 2 years ago
Gabi Melman 030bcb8890
Update common.h 2 years ago
Gabi Melman 7ac740a029
Update common.h 2 years ago
gabime 6dffd7c6e8 update clang format again 2 years ago
gabime f36b2c5f93 reformat code 2 years ago
gabime dcd5904bdc Updated clang-format
Merged with origin
2 years ago
gabime 6de0ffa15f Updated clang format to google style 2 years ago
gabime 66de161355 fix fwd 2 years ago
gabime e28eadcd52 Clang format 2 years ago
gabime 2a1959c2ce wip static_only 2 years ago
gabime cff3e27115 Removed usages of SPDLOG_COMPILED_LIB macro 2 years ago
gabime 6d520df916 Removed header only options 2 years ago
gabime fc81e0390b Removed SPDLOG_COMPILED_LIB/HEADER_ONLY macros from common.h 2 years ago
gabime b16a8951bc Added more [[nodiscard]] to functions in common 2 years ago
gabime a34fb3761c Added nodiscard to level_to_number() 2 years ago
gabime 73eb6bc1f5 Replace static_cast with level_to_number in color sinks 2 years ago
Gabi Melman 7d3b5a1b10
Update wincolor_sink-inl.h 2 years ago
gabime 9a7448e4c8 Renamed to level_to_number 2 years ago
gabime 433cac487e Renamed spdlog::log_level to spdlog::level and added some level tests 2 years ago
gabime 7c0afada60 check SPDLOG_SOURCE_LOCATION in macros and in runtime 2 years ago
gabime ea1c829764 fix warning 2 years ago
Gabi Melman e315bcb2a9 Fix compilations in windows 2 years ago
gabime e63d110baa use constexpr for colors in ansicolor_sink 2 years ago
gabime 5683d16b36 Fix atomic level 2 years ago
gabime 7d9cf59649 Fix atomic level 2 years ago
gabime 31a7dc6e1e Fix atomic level 2 years ago
gabime 3a405ba958 Fix atomic level 2 years ago
gabime 392917f855 null_atomic_log_level and fix compile 2 years ago
gabime ac2955cb48 Use std::array for string levels storage 2 years ago
gabime 96bed42974 Clean level names logic and inline them 2 years ago
gabime 3d5ddea136 Use std::vformat 2 years ago
gabime a3ef3ab7a4 Removed SPDLOG_FMT_STRING 2 years ago
gabime b777497b0d Removed un needed inline specifier 2 years ago
gabime 5c93f5ff34 Revert last commit 2 years ago
gabime 9c1e1c85aa Removed un needed loc_with_fmt constructor 2 years ago
gabime 8488b027e9 Formatting 2 years ago
gabime ad18d4e1cb Added missing include to <spdlog/fmt/xchar.h> 2 years ago
gabime c0c1b49fa3 Fixed soruce location macro names 2 years ago
gabime 3979bd15f7 Fixed build 2 years ago
Gabi Melman 536da46a2c Changed macro name to SPDLOG_EMIT_SOURCE_LOCATION 2 years ago
Gabi Melman ce6bccb194 Fixed logger::log with std::format under msvc 2 years ago
Gabi Melman 768de091ee Update common.h 2 years ago
Gabi Melman 2718d4671b Update common.h 2 years ago
Gabi Melman e1c7e6fde4 Update logger.h 2 years ago
Gabi Melman fb40b49ef0 Update logger.h 2 years ago
gabime 82069b2455 Fixed include <version> 2 years ago
gabime 5ae1ace844 Added loc_with_fmt overload with runtime_format_string 2 years ago
gabime bcc24961a0 Added forgotten inline keywords 2 years ago
gabime af2f24de07 Removed swap from logger and renamed source location macro to SPDLOG_USE_SOURCE_LOCATION 2 years ago
gabime 5882bfd0ad Simplify by replacing is_convertible_to_sv with string_view_t param 2 years ago
gabime 3eea04bcd3 Simplify by replacing is_convertible_to_sv with string_view_t param 2 years ago
gabime b19ceb6d0a Remove refs from format_string param 2 years ago
gabime cead430eed Fixed compile 2 years ago
gabime 90e92438c8 clang format 2 years ago
gabime 1faeb5b6fa Minor cleanups 2 years ago
gabime b3ab35cf8e Fix issues with string view 2 years ago
gabime b2372fd076 Enable std::source_location if SPDLOG_EMIT_SOURCE_LOCATION is defined 2 years ago
gabime ac6b7ec87e check should_log in log_with_format_ 2 years ago
gabime 19d4e60561 Replaced details::make_unique with std::make_unique 2 years ago
gabime 4965d6ef68 Bumped bundled fmt to version 10.1.1 2 years ago
gabime 11770fc7e5 Added comment in ringbuffer_sink.h 2 years ago
gabime 8f7400731e ringbuffer_sink: replaced last_raw() and last_formatted() with drain_raw() and drain_formatted() and added tests 2 years ago
gabime d8829e7714 Added [[nodiscard]] qualifiers to circular_q 2 years ago
gabime 55f84d458b Return true from details::circular_q::full() if capacity is 0 2 years ago
gabime a8b74096b2 Simplified details::circular_q by removing iterator support and updated tests 2 years ago
gabime aacea38f9d Updated details::circular_q and added some tests for it 2 years ago
gabime 202260719f merge 2 years ago
gabime 5993e78aac Removed SPDLOG_WCHAR_SUPPORT macro 2 years ago
gabime 7c054b6dba Inlined sink_it_ 2 years ago
gabime 54d402e094 Fixed tidy warning 2 years ago
gabime 6a53d6354b minor cleanup 2 years ago
gabime a38add8456 Removed SPDLOG_NO_TLS and updated cmake 2 years ago
gabime e1ee0c62a7 Replaced SPDLOG_CONSTEXPR and SPDLOG_NOEXCEPT macros with c++20 keywords 2 years ago
gabime d7db2cf3aa Added some [[nodiscard]] annotations 2 years ago
gabime 6cac90b89a clang format 2 years ago
gabime 2ecc00e9c6 Simplified code 2 years ago
gabime 92daf6954b Removed backtrace feature 2 years ago
gabime d94830814f Removed SPDLOG_WCHAR_TO_UTF8_SUPPORT 2 years ago
gabime f530b2dbaa Upaded major ver to 2.0.0 2 years ago
gabime 213b2c0151 Bumped spdlog version to 1.12.0 2 years ago
gabime 27c518d509 Updated bundled fmt to version 10.0.0 2 years ago
gabime ea6d8fde1d Upaded major ver to 2.0.0 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
gabime ea1af20840 Update error message in default error handler 2 years ago
gabime 1fba68bfe2 Catch exceptions from async logger. Fix #2618 2 years ago
Gabi Melman dd173bc544
Update daily_file_sink.h 2 years ago
Gabi Melman fcc8a95a95
Update daily_file_sink.h 2 years ago
Gabi Melman 9fcf609b67
Update daily_file_sink.h 2 years ago
Bernd Ritter af1785b897
Removes special format handling for fmt. (#2736)
* Removes special format handling for fmt. Regains test compatibility with fmt
1.10.0.

fixes #2735

* reverted std::vector back to filename_t and used pointer to array start likewise as fmt's implementation uses

* calc_filename buffer increase softened, exception is throw if buffer exceeds 4k, filename parameter renamed to match intend.

* calc_filetime based on std::put_time for simpler implementation
2 years ago
James Ruan e4f92bed48
fix ringbuffer_sink moving warning (#2722) 2 years ago
Sergey Fedorov c65aa4e488
os-inl.h: fix for missing pthread_threadid_np (#2715) 2 years ago
Gabi Melman e539d6ae42
Update registry-inl.h fix #2691 2 years ago
H1X4 0ca574ae16
fix build for master fmt (non-bundled) (#2694)
* fix build for master fmt (non-bundled)

* update fmt_runtime_string macro

* fix build of updated macro
2 years ago
SCC/楊志璿 42d1f40a18
Fix stdout_sink_base::log's behavior inconsistency (#2646)
* 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>
2 years ago
Luis Angerstein 1262a249a6
Fix os namespace in systemd_sink.h (#2668)
* Fix os namespace in systemd_sink.h

* Remove spdlog:: prefix from os::thread_id() call
3 years ago
Gabi Melman 2d57e3b57e
Update and rename kafka_skin.h to kafka_sink.h 3 years ago
听风 b25aaecf6a
feat(kafka_skin.h): kafka log support (#2655)
* feat(kafka_skin.h): kafka log support

add kafka log support

* refactor(kafka_skin.h): remove producer_  check

remove producer_  check
3 years ago
Gabi Melman 262acfdeb5
Update os-inl.h 3 years ago
Gabi Melman a4d8817745
move include cassert 3 years ago
Gabi Melman 66407f5b48
Better handling of utf to wchar 3 years ago
璀境石 4641347c3f
msvc_sink: support utf8 (#2651)
* msvc_sink: support utf8
3 years ago