Commit Graph

4373 Commits

Author SHA1 Message Date
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
3cf94968e7
Add missing include 2022-04-21 22:11:16 -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
Gabi Melman
b3ce5ed379
Remove comment 2022-04-21 15:24:37 +03:00
Gabi Melman
78fbc69c94
Merge pull request #2336 from aengusjiang/v1.x
[issues/2332]clean code, clean up the warning
2022-04-21 15:17:14 +03:00
Gabi Melman
4ccbb5a71a
Merge pull request #2342 from espkk/v1.x
Make file_event_handlers an aggregate
2022-04-15 12:22:35 +03:00
espkk
e6265c04ae Make file_event_handlers an aggregate 2022-04-15 11:54:11 +03:00
Aengus.Jiang
184fae06d7 clean code, clean up the warning 2022-04-10 13:13:59 +08:00
gabime
76fb40d954 clang format 2022-04-04 16:48:58 +03:00
gabime
757e9f8ec6 Bump version to 1.10.0 2022-04-04 16:48:24 +03:00
Gabi Melman
fc51c095ba
Merge pull request #2328 from Delgan/GH-2323-add-systemd-identifier
Add optional "ident" argument to systemd sink constructor
2022-04-02 11:00:18 +03:00
Delgan
36b4b9dac9 Add optional "ident" argument to systemd sink constructor 2022-04-01 23:20:28 +02:00
Gabi Melman
083ea59fbd
Merge pull request #2324 from Delgan/GH-2320-add-systemd-formatter
Add option to enable formatting of systemd sink
2022-03-30 00:40:36 +03:00
Delgan
c1aeefb0c9 fixup! Add option to enable formatting of systemd sink
Add default value to "systemd_sink" contructor
2022-03-29 22:26:52 +02:00
Delgan
3c1ee54112 Add option to enable formatting of systemd sink 2022-03-27 11:31:49 +02:00
Gabi Melman
a49456f7f2
Merge pull request #2317 from risa2000/patch-1
Fixed compiler error when building on Windows with #define UNICODE
2022-03-24 06:45:08 +02:00
risa2000
52dc210423
Fixed compiler error when building on Windows with #define UNICODE
The original `InetPton` expands to `InetPtonW` when building with UNICODE defined and expects the string parameter to be wchar_t. On the other hand macro `TEXT()` just adds prefix `L` to a string literal (just making it wchar_t literal). The proper way here would be converting `host.c_str()` result from UTF-8(?) into wchar_t (UNICODE) string, but this seems to be an overkill since the host is typically an IP address or a host/domain name. So assuming an ASCII input should be reasonably safe.
2022-03-22 16:20:45 +01:00
Gabi Melman
b1478d98f0
Merge pull request #2305 from nUl1/fix-fopens
Fix fopen_s error reporting with PREVENT_CHILD_FD
2022-03-11 23:10:35 +02:00
Andrey Bugaevskiy
5ee969e4f6 Fix fopen_s error reporting with PREVENT_CHILD_FD 2022-03-11 19:22:45 +00:00
Gabi Melman
7f8a61e79d
Merge pull request #2300 from adamcalhoon/fix-fmt-external-ho-deps
When built with SPDLOG_FMT_EXTERNAL_HO consumers of the spdlog target…
2022-03-06 22:03:47 +02:00
Adam Calhoon
69cac816aa When built with SPDLOG_FMT_EXTERNAL_HO consumers of the spdlog targets depend on fmt
The cmake/spdlogConfig.cmake.in file properly takes into account the fmt
package dependency when building with SPDLOG_FMT_EXTERNAL:BOOL=ON but
not when built with SPDLOG_FMT_EXTERNAL_HO:BOOL=ON.

Prior to these changes SPDLOG_FMT_EXTERNAL_HO:BOOL=ON results in
exported targets with INTERFACE_LINK_LIBRARIES that contain
fmt::fmt-header-only.

As such, the installed spdlogConfig.cmake file should attempt to find
that dependency for the consumer.
2022-03-06 11:04:59 -05:00
Gabi Melman
2f2d04b3e8
Merge pull request #2278 from adriweb/patch-1
pattern_formatter-inl: fix reorder-ctor warning
2022-02-15 18:44:42 +02:00
Adrien Bertrand
9cd9c98f59
pattern_formatter-inl: fix reorder-ctor warning
Fix `Wreorder-ctor` warning

```
spdlog/pattern_formatter-inl.h:1028:7: error: field 'custom_handlers_' will be initialized after field 'need_localtime_' [-Werror,-Wreorder-ctor]
    , custom_handlers_(std::move(custom_user_flags))
      ^
```

Move the initialization of `need_localtime_(true)` right after `pattern_time_type_` as expected.
2022-02-15 11:26:25 -05:00
Gabi Melman
f2461f1430
Merge pull request #2273 from surfycui/v1.x 2022-02-14 09:47:01 +02:00
Surfy Cui
a732a0dc85 Limit max number of rotating files to 200000, not max size 2022-02-14 15:30:06 +08:00
Gabi Melman
4c2ce2c82c
Update rotating_file_sink-inl.h 2022-02-13 09:41:15 +02:00
gabime
4cea9b8729 Limit max number of rotating files to 200000. Fix #1905 2022-02-12 14:10:43 +02:00
gabime
53c9b70ea3 Fix #2211 2022-02-12 14:06:11 +02:00
gabime
71105e0b07 Fixed #2227 2022-02-12 13:59:12 +02:00
gabime
c432fdd987 Bump fmt to version 8.1.1 and run clang-format 2022-02-12 13:20:15 +02:00
gabime
d8199b607d Bump fmt to version 8.1.1 and run clang-format 2022-02-12 13:19:45 +02:00
Gabi Melman
b7836c33ae
Merge pull request #2269 from kyuheon-kr/fix-issue-2201
Fix issue #2201
2022-02-08 14:13:56 +02:00
Kyuheon Kim
d497f494f0 Apply pattern width to one of the source information fields while missing source information 2022-02-08 20:29:58 +09:00
gabime
0b48976be4 flush before rotating 2022-02-05 19:45:19 +02:00
gabime
5b03dc1796 Throw if rotating_file_sink constructor receives max_size==0 as arg 2022-02-05 17:37:55 +02:00
gabime
ec8b0beddd comment 2022-02-05 17:16:36 +02:00
gabime
7536192058 Fix #2261 2022-02-05 17:13:33 +02:00
gabime
5afff7821f throw if flush failed 2022-02-05 14:23:33 +02:00
Gabi Melman
8fb112158a
Merge pull request #2255 from LeonBrands/patch-1
added a few missing files/directories to the gitignore
2022-01-23 20:56:29 +02:00
Leon Brands
792d618c02
added a few missing files/directories to the gitignore 2022-01-23 18:49:50 +01:00
Gabi Melman
93f59d04e9
Merge pull request #2249 from PixelParas/patch-1
removed unneeded spaces
2022-01-17 10:08:11 +02:00
Pixel
666bec5017
removed unneeded spaces
On Line 83 someone probably misclicked tab just removed that tab
2022-01-17 12:13:37 +05:30
Gabi Melman
2382c87aa3
Update pattern_formatter-inl.h 2022-01-16 23:30:57 +02:00
Gabi Melman
caa0e54396
Merge pull request #2246 from doug1234/DontGetTheDate
Now only getting time if pattern_formatter needs it
2022-01-16 21:43:43 +02:00
doug1234
28b9adf794 Added the last few suggested changes. 2022-01-15 16:41:06 -05:00
doug1234
584d77237e Several minor improvements based on code review suggestions. 2022-01-15 13:35:27 -05:00
doug1234
d9ec02d400 Fix mistake in previous checkin. 2022-01-14 20:06:26 -05:00
doug1234
5568b16ed5 Resetting the needs time flag when setting a pattern. 2022-01-13 21:35:02 -05:00
doug1234
eab522e743 Now only getting the date if formater needs to display date related information. 2022-01-13 20:57:14 -05:00