Commit Graph

500 Commits

Author SHA1 Message Date
Gabi Melman
8222ca4837
Update test_stopwatch.cpp 2023-05-27 22:46:27 +03:00
gabime
1fba68bfe2 Catch exceptions from async logger. Fix #2618 2023-05-27 15:33:02 +03:00
Gabi Melman
2a861d28bd
Update test_errors.cpp 2023-03-05 21:43:07 +02:00
Gabi Melman
febc1e233d
Update test_errors.cpp 2023-03-05 21:34:02 +02:00
Gabi Melman
763ff37348
Update test_errors.cpp 2023-03-05 21:30:29 +02:00
Vitaly Zaitsev
7f09c88817
Added Catch v3 support (#2661)
* Added Catch v3 support.

* Removed extra square brackets from some tests.
2023-03-01 13:51:04 +02:00
gabime
8be5b41a2f revert pr #2656 2023-03-01 01:12:50 +02:00
Vitaly Zaitsev
2a6d3e9f3b
Added Catch v3 support. (#2656) 2023-03-01 00:16:39 +02:00
gabime
60f5cb73a8 Revert commit 0e9ccd73ef 2023-02-26 14:00:43 +02:00
Gabi Melman
0e9ccd73ef
Removed use of SPDLOG_FMT_RUNTIME from test_errors.h 2023-02-26 13:48:42 +02:00
Gabi Melman
839ea957ab
Update test_stopwatch.cpp 2023-02-26 02:31:12 +02:00
Mohammad Ali
3cab260814
Add a trivial callback sink (#2610)
Add a trivial callback sink
2023-01-19 19:46:34 +02:00
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>
2022-12-30 15:20:10 +02:00
Gabi Melman
dd0d0f68c4
Added compile mscv_sink.h to tests 2022-12-10 00:25:31 +02:00
György Katona
8512000f36
Unnecessary backtrace begin/end logs (#2568)
* add empty getter function to tracer

* add unit test to check empty tracer

Co-authored-by: Gyorgy Katona <gykatona@logmein.com>
2022-12-09 10:25:17 +02:00
Charles Milette
4f80077339
Support compile-time format string checking with std::format (#2544)
* Support compile-time format string checking with std::format

* Fix pre-VS 17.5 compilation

* Fix compilation without wchar_t support

* What am I doing

* Bring back fmt optimization

* Move to_string_view to common.h

* Fix SPDLOG_CONSTEXPR_FUNC emitting duplicate symbol errors when building in C++11

* Also add inline on VS 2013

* Appender doesn't work on wide strings
2022-11-12 23:07:11 +02:00
gabime
070dd181df clang format 2022-10-31 17:09:45 +02:00
offa
29b24f9e72 Use pragams instead of compile options 2022-09-30 13:20:15 +02:00
offa
b8fdc9bf5d Workaround GCC 12 warning 2022-09-29 19:28:44 +02:00
Nicolas Benes
5ca5fdff9f Use lower-case "windows.h" for case-sensitive file systems
The "windows.h" in MinGW-W64 is lower-case. When cross-compiling for
Windows on Linux with a case-sensitive file system, the upper-case
"Windows.h" file is not found and compilation fails.

Always use lower-case "windows.h" to fix cross-compilation.
2022-09-26 12:42:01 +02:00
Rosen Penev
68f42a5b90 test_stopwatch: fix on mingw
There are some timing shenanigans with GCC's chrono that make this
unreliable. Add a start/stop and test for that to work around.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-06-25 19:07:36 -07:00
Gabi Melman
9b4b373121
Merge pull request #2365 from conr2d/feature/need_localtime
Allow overriding need_localtime for custom formatter
2022-05-07 21:53:32 +03:00
Jeeyong Um
aa7490d187 Set eol to the test for overriding need_localtime 2022-05-08 01:20:27 +08:00
Jeeyong Um
38929f856d Allow overriding need_localtime for custom formatter 2022-05-07 20:44:00 +08:00
David Roman
ece96216c4
fix clone async test
Fix #2363
2022-05-07 12:30:41 +02:00
Charles Milette
cd4f6c1466
Replace fmt_helper::to_string by a macro 2022-04-26 23:25:35 -04:00
Charles Milette
37dd6bb159
Address PR review comments 2022-04-25 21:59:56 -04:00
Charles Milette
714cf12822
Add fmt_helper.h include to includes.h and os-inl.h 2022-04-22 23:28:28 -04:00
Charles Milette
c203b4df8e
Fix conversion from fmt::memory_buffer to fmt::string_view 2022-04-21 23:38:12 -04:00
Charles Milette
56adf64ccf
Actually fix bad #ifdef 2022-04-21 22:43:13 -04:00
Charles Milette
91019f4f46
Fix bad #ifdef 2022-04-21 22:36:04 -04:00
Charles Milette
ebeb3707b1
Switch to vformat_to
Drive-by: reduce the amount of occurences of #ifdef SPDLOG_USE_STD_FORMAT
2022-04-21 21:59:02 -04:00
Andrey Bugaevskiy
5ee969e4f6 Fix fopen_s error reporting with PREVENT_CHILD_FD 2022-03-11 19:22:45 +00:00
gabime
c432fdd987 Bump fmt to version 8.1.1 and run clang-format 2022-02-12 13:20:15 +02:00
gabime
5b03dc1796 Throw if rotating_file_sink constructor receives max_size==0 as arg 2022-02-05 17:37:55 +02:00
Gabi Melman
ad08f13aac Update test_file_helper.cpp 2021-12-11 16:42:27 +02:00
Gabi Melman
6638c23cfc Update test_async.cpp 2021-12-11 16:42:17 +02:00
Gabi Melman
378a42c887 Update test_file_helper.cpp 2021-12-11 16:42:00 +02:00
Gabi Melman
9abcf38b90 Update test_file_helper.cpp 2021-12-11 16:41:49 +02:00
gabime
8715f51c61 Fixed file_event_handlers test for windows 2021-12-11 16:41:17 +02:00
gabime
37cbab363e updated file_event_handlers tests 2021-12-11 16:39:57 +02:00
gabime
afdcfc710e Updated file_event_handlers tests 2021-12-11 16:39:31 +02:00
gabime
16bc6d04ad Added file event handlers test 2021-12-11 16:39:13 +02:00
Gabi Melman
1f58535920 Fixed test_macros tests 2021-12-11 16:27:27 +02:00
Gabi Melman
ca1eaedf7b
Update test_daily_logger.cpp 2021-11-17 04:45:49 +02:00
Gabi Melman
8bd5f4f883
Update test_daily_logger.cpp 2021-11-17 01:04:27 +02:00
gabime
dc030ec53c clang-format 2021-11-16 23:44:35 +02:00
Charles Milette
484bf07379
Fix test_fmt_helper 2021-11-15 18:34:40 -05:00
Charless Milette
ba120e524b Add unit test for daily_filename_format_calculator 2021-11-15 15:46:22 -05:00
Charless Milette
2d77ef92b0 Avoid specializing std::formatter for std::tm (not a great idea after all) 2021-11-15 15:27:34 -05:00
Charless Milette
f6901606f5 Add std::tm formatter, fix spdlog::stopwatch formatter, conditionally use fmt::runtime in test_errors 2021-11-15 14:57:13 -05:00
Charless Milette
44a4517e2b Support C++20 std::format as an alternative to fmtlib 2021-11-13 11:29:05 -05:00
Your Full Name
d54b8e89c0 fixed #2058 by updating catch2 to v2.13.7 2021-09-08 13:23:36 +03:00
dkavolis
d8f13cbd5b replace FormatString template argument with fmt::basic_format_string 2021-07-22 16:23:56 +01:00
gabime
e7e8b75a4c clang-format 2021-07-19 00:50:51 +03:00
gabime
0035a0c98d Fixed dup sink compile warnings in older compilers with back_inserter 2021-06-28 12:09:39 +03:00
gabime
7b14a65b2b Fixed format_to deprecated warning by wrapping the buffer with std::back_inserter 2021-06-24 17:07:14 +03:00
Gabi Melman
f2d1d573f5
Fix #1967 2021-06-07 22:39:42 +03:00
steven lunt
ab72de5f7a Revert "added spdlog::level::set_string_view to enable alternate log level names without changing the build via SPDLOG_LEVEL_NAMES"
This reverts commit 2a16d1d230.
2021-05-18 19:25:07 -04:00
steven lunt
2a16d1d230 added spdlog::level::set_string_view to enable alternate log level names without changing the build via SPDLOG_LEVEL_NAMES 2021-03-24 16:22:54 -04:00
Charles Milette
9e19012cb0
Remove filename_memory_buf_t from headers 2021-01-10 18:19:28 -05:00
Charles Milette
f0a4ddd78b
Fix character issues in test_errors.cpp 2021-01-06 20:00:59 -05:00
Charles Milette
c691769e46
Fix other build errors and unit tests 2021-01-06 19:39:47 -05:00
Charles Milette
19dc30567e
Fix build errors 2021-01-06 18:55:57 -05:00
Charles Milette
a453bccff0
Better support for / separators on Windows, improve wchar filename coverage 2021-01-06 04:15:14 -05:00
ryan-rsm-mckenzie
030d85a9b3 ensure stdout color sinks do not leak windows headers with SPDLOG_COMPILED_LIB 2020-12-26 03:45:12 -08:00
Francesco Biscani
fc1ce48dc7 Increase sleep time on a test case to avoid spurious failures. 2020-11-26 09:45:39 +01:00
gabime
3bed78356e Added cfg tests 2020-09-27 02:10:52 +03:00
gabime
8923922f30 Cleaned level loading from env var 2020-09-27 02:08:24 +03:00
gabime
231ca50700 clang-format 2020-09-26 15:34:05 +03:00
gabime
1ac2dcc537 wip fix #1680 again 2020-09-26 14:41:33 +03:00
gabime
3a68eecb28 Fix issue #1680 2020-09-25 18:19:50 +03:00
gabime
32b6f1619f Added tests for issue #1680 2020-09-25 14:44:01 +03:00
gabime
934a9bb23e Fix issue #1617 2020-08-30 15:18:33 +03:00
gabime
d6329b9dce Added some stopwatch tests 2020-08-29 03:25:16 +03:00
gabime
cd701761f9 clang-format 2020-08-26 00:10:05 +03:00
Raul Tambre
76cdeb62e3 Don't enable C language in CMake
spdlog doesn't seem to actually require the C language.
Not enabling it results in a significant initial configure time speedup.
2020-07-21 11:39:40 +03:00
Raul Tambre
ae9627c64c Raise CMake requirement to 3.13
* Reduces the range of possible version we'd need to test with.
* Enables newer policies reducing possible deprecation warnings from new policies.
* Allows removing some code for compatibility with older versions.
* Coincides with LLVM's bump to requiring CMake 3.13.
2020-07-20 22:03:50 +03:00
Konstantin Podsvirov
075dcee042 Twice tolerance waiting time with MinGW
Increased tolerance waiting time for MinGW in dequeue-empty-nowait test
case, because this test case not passed on slow and powerful computers.
2020-06-10 23:44:30 +03:00
gabime
a0dae55a69 Revert 7f15fb2a21 since it breaks the ABI 2020-06-07 14:38:16 +03:00
Tamas Florin
071206ef59 Add support for custom filename calculator in rotating_file_sink. 2020-06-04 13:38:21 +03:00
Gabi Melman
b6c6b30c0d
Delete meson.build 2020-05-02 18:53:40 +03:00
gabime
75c15e8028 Formatted cmake 2020-05-02 11:42:08 +03:00
gabime
ff0e430e46 Formatted cmake using cmake-format 2020-05-02 11:38:14 +03:00
Bruce Mitchener
937fe7e909 cmake: Fix tabs, whitespace at EOL. 2020-05-02 07:17:15 +07:00
Gabi Melman
3ac9540351
Update test_file_helper.cpp 2020-04-29 14:50:25 +03:00
Gabi Melman
d5709c9d70
temp test appveoyr 2020-04-29 14:15:52 +03:00
gabime
81444265f4 clang-format 2020-04-19 11:33:36 +03:00
Ron Rechenmacher
9e6f5b6b2d add single logger method and log_msg constructor and tests/test_time_point.cpp 2020-04-18 08:58:11 -05:00
gabime
854abdf5e6 Added cmake option SPDLOG_BUILD_ALL 2020-04-12 02:43:42 +03:00
Gabi Melman
34244656a6
Update test_fmt_helper.cpp 2020-04-11 21:09:48 +03:00
gabime
a8169a3d6b clang-format 2020-04-10 15:35:58 +03:00
gabime
d09e03606c Fixed multiple clang-tidy warnings 2020-04-08 18:18:27 +03:00
gabime
b2017f5653 Fixed multiple clang-tidy warnings 2020-04-08 18:17:21 +03:00
gabime
c16eb80d7f Fixed multiple clang-tidy warnings 2020-04-08 17:04:10 +03:00
Gabi Melman
f57378d8ba
Update test_eventlog.cpp 2020-03-28 13:59:59 +03:00
gabime
0a5ada6411 clang-format 2020-03-21 15:25:26 +02:00
gabime
963f8d3485 Fixed tests 2020-03-21 15:25:05 +02:00
Gabi Melman
60a8c5f1c9 Added padding support and set_pattern to custom_flags 2020-03-21 15:03:41 +02:00
Gabi Melman
752d5685dc Moved pattern formatter from spdlog/details to spdlog/ 2020-03-21 13:33:04 +02:00