Commit Graph

3958 Commits (15425d849e010d3b42186d826f9448457b08b3a4)
 

Author SHA1 Message Date
Matheus Medeiros Sarmento 15425d849e Add new rotating file sink with different naming formation
This is a proposal for existing rotating file sink.
In this sink, files will be renamed appending the date in which they
were rotated, having so there is no file limit.
There is also a protection against multiple files rotating at the same time,
by appending ".{index}"
3 years ago
Gabi Melman a49456f7f2
Merge pull request #2317 from risa2000/patch-1
Fixed compiler error when building on Windows with #define UNICODE
4 years ago
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.
4 years ago
Gabi Melman b1478d98f0
Merge pull request #2305 from nUl1/fix-fopens
Fix fopen_s error reporting with PREVENT_CHILD_FD
4 years ago
Andrey Bugaevskiy 5ee969e4f6 Fix fopen_s error reporting with PREVENT_CHILD_FD 4 years ago
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…
4 years ago
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.
4 years ago
Gabi Melman 2f2d04b3e8
Merge pull request #2278 from adriweb/patch-1
pattern_formatter-inl: fix reorder-ctor warning
4 years ago
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.
4 years ago
Gabi Melman f2461f1430
Merge pull request #2273 from surfycui/v1.x 4 years ago
Surfy Cui a732a0dc85 Limit max number of rotating files to 200000, not max size 4 years ago
Gabi Melman 4c2ce2c82c
Update rotating_file_sink-inl.h 4 years ago
gabime 4cea9b8729 Limit max number of rotating files to 200000. Fix #1905 4 years ago
gabime 53c9b70ea3 Fix #2211 4 years ago
gabime 71105e0b07 Fixed #2227 4 years ago
gabime c432fdd987 Bump fmt to version 8.1.1 and run clang-format 4 years ago
gabime d8199b607d Bump fmt to version 8.1.1 and run clang-format 4 years ago
Gabi Melman b7836c33ae
Merge pull request #2269 from kyuheon-kr/fix-issue-2201
Fix issue #2201
4 years ago
Kyuheon Kim d497f494f0 Apply pattern width to one of the source information fields while missing source information 4 years ago
gabime 0b48976be4 flush before rotating 4 years ago
gabime 5b03dc1796 Throw if rotating_file_sink constructor receives max_size==0 as arg 4 years ago
gabime ec8b0beddd comment 4 years ago
gabime 7536192058 Fix #2261 4 years ago
gabime 5afff7821f throw if flush failed 4 years ago
Gabi Melman 8fb112158a
Merge pull request #2255 from LeonBrands/patch-1
added a few missing files/directories to the gitignore
4 years ago
Leon Brands 792d618c02
added a few missing files/directories to the gitignore 4 years ago
Gabi Melman 93f59d04e9
Merge pull request #2249 from PixelParas/patch-1
removed unneeded spaces
4 years ago
Pixel 666bec5017
removed unneeded spaces
On Line 83 someone probably misclicked tab just removed that tab
4 years ago
Gabi Melman 2382c87aa3
Update pattern_formatter-inl.h 4 years ago
Gabi Melman caa0e54396
Merge pull request #2246 from doug1234/DontGetTheDate
Now only getting time if pattern_formatter needs it
4 years ago
doug1234 28b9adf794 Added the last few suggested changes. 4 years ago
doug1234 584d77237e Several minor improvements based on code review suggestions. 4 years ago
doug1234 d9ec02d400 Fix mistake in previous checkin. 4 years ago
doug1234 5568b16ed5 Resetting the needs time flag when setting a pattern. 4 years ago
doug1234 eab522e743 Now only getting the date if formater needs to display date related information. 4 years ago
Gabi Melman 4cfdc8c5c8
Merge pull request #2245 from daverigby/level_enum_fwd
Allow forward-declaration of level_enum
4 years ago
Dave Rigby 2a4c34b878 Allow forward-declaration of level_enum
spdlog::level::level_enum cannot be forward-declared at present, as
the definition does not specify an underlying type.

To allow users to make use of <spdlog/fwd.h> to refer to
level::level_enum without pulling in all of <spdlog/common.h> (which
can be quite costly), specify an underlying type (int) for
level::level_enum, then add a forward-declaration for it to
spdlog/fwd.h.

Note this required explicitly casting level_enum to size_t within ansicolor_sink due to sign-conversion errors:

    implicit conversion changes signedness: 'const level::level_enum' to 'std::__1::array::size_type' (aka 'unsigned long') [-Wsign-conversion]

It would appear that an enum with an unspecified underlying type is in
some kind of superposition - it can be treated as both signed _and_
unsigned - using an underlying type of 'unsigned int' triggers even
more warnings of this kind...
4 years ago
Gabi Melman 729d7f6d88
Merge pull request #2234 from SpriteOvO/v1.x
Reset current size if rotated files on open
4 years ago
Sprite 3540ba32e9 Reset current size if rotated files on open 4 years ago
Gabi Melman 32fedcf90c
Merge pull request #2228 from timblechmann/feature/to_hex_span_fix
spdlog: fmt - support `std::span` in `to_hex`
4 years ago
Tim Blechmann 626efad307 spdlog: fmt - support `std::span` in `to_hex`
`std::span` does not have `const_iterator`. this prevents `to_hex` from
being used with `std::span<>`. to fix this, we provide an explicit
overload.

compare: https://cplusplus.github.io/LWG/issue3320
4 years ago
Gabi Melman cc30229abb
Merge pull request #2216 from vnepogodin/patch-1
Reduce warnings with pedantic compiler `-Wuseless-cast`
4 years ago
Vladislav Nepogodin a087dee98a
🚧 fix building with c++11 4 years ago
Vladislav Nepogodin f096c615c3
🔥 conditional_cast 4 years ago
Vladislav Nepogodin f81cb9f365
Revert "Useless cast"
This reverts commit 7e95963940.
4 years ago
Vladislav Nepogodin 7e95963940
Useless cast 4 years ago
Gabi Melman 3f49f0f247
Update README.md 4 years ago
Gabi Melman 4cb1187871
Update README.md 4 years ago
Gabi Melman fe782edc53
Update .travis.yml 4 years ago
Gabi Melman 702cf4f54a
Update .travis.yml 4 years ago