Commit Graph

4022 Commits

Author SHA1 Message Date
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...
2022-01-11 15:12:23 +00:00
Gabi Melman
729d7f6d88
Merge pull request #2234 from SpriteOvO/v1.x
Reset current size if rotated files on open
2022-01-06 01:59:05 +02:00
Sprite
3540ba32e9 Reset current size if rotated files on open 2022-01-04 09:16:20 +08:00
Gabi Melman
32fedcf90c
Merge pull request #2228 from timblechmann/feature/to_hex_span_fix
spdlog: fmt - support `std::span` in `to_hex`
2021-12-31 01:23:55 +02:00
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
2021-12-30 09:46:27 +08:00
Gabi Melman
cc30229abb
Merge pull request #2216 from vnepogodin/patch-1
Reduce warnings with pedantic compiler `-Wuseless-cast`
2021-12-19 21:08:38 +02:00
Vladislav Nepogodin
a087dee98a
🚧 fix building with c++11 2021-12-19 21:48:39 +04:00
Vladislav Nepogodin
f096c615c3
🔥 conditional_cast 2021-12-19 21:37:21 +04:00
Vladislav Nepogodin
f81cb9f365
Revert "Useless cast"
This reverts commit 7e95963940.
2021-12-19 21:05:21 +04:00
Vladislav Nepogodin
7e95963940
Useless cast 2021-12-19 15:04:47 +04:00
Gabi Melman
3f49f0f247
Update README.md 2021-12-12 10:01:34 +02:00
Gabi Melman
4cb1187871
Update README.md 2021-12-12 09:59:40 +02:00
Gabi Melman
fe782edc53
Update .travis.yml 2021-12-11 18:23:36 +02:00
Gabi Melman
702cf4f54a
Update .travis.yml 2021-12-11 18:11:55 +02:00
Gabi Melman
0c84e21022
Update .travis.yml 2021-12-11 18:08:40 +02:00
Gabi Melman
ee74321ac3
Update .travis.yml 2021-12-11 17:39:43 +02:00
Gabi Melman
e45c11f98a
Update example.cpp 2021-12-11 17:18:40 +02:00
Gabi Melman
c211288576
Update example.cpp 2021-12-11 17:12:15 +02:00
Gabi Melman
4fefd51e08
Fixed custom type example to work in c++11 2021-12-11 17:07:10 +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
gabime
ac6908a139 Update bench CMakelists.txt 2021-12-11 16:37:06 +02:00
Gabi Melman
28e415fb3e Update to google benchmark to v1.6.0 2021-12-11 16:36:55 +02:00
Gabi Melman
ab2e72340a Update thread_pool.h 2021-12-11 16:36:40 +02:00
Gabi Melman
da9c16278a Update thread_pool.h 2021-12-11 16:36:30 +02:00
Gabi Melman
b5d6c939fd Update thread_pool.h 2021-12-11 16:36:20 +02:00
Philippe Serreault
fda2b361da Added missing global thread-pool initialization helper. 2021-12-11 16:35:58 +02:00
Philippe Serreault
6636ff05e6 Allow custom callback to be executed by thread-pool's threads before joining them.
This is similar to a change that was made a while ago ( https://github.com/gabime/spdlog/pull/208 ).
2021-12-11 16:34:48 +02:00
Acretock
9e17fafe1b c style cast -> static_cast 2021-12-11 16:29:10 +02:00
Gabi Melman
1f58535920 Fixed test_macros tests 2021-12-11 16:27:27 +02:00
Gabi Melman
8dd012096a Update README.md 2021-12-11 16:24:29 +02:00
gabime
f81970191a Fixed example for custom_type 2021-12-11 16:24:07 +02:00
gabime
b8b16e49a5 Fixed example for custom_type 2021-12-11 16:23:46 +02:00
gabime
2c21d9ecf8 Fixed example for custom_type 2021-12-11 16:23:20 +02:00
gabime
2a45eff693 Fixed example for custom_type 2021-12-11 16:22:51 +02:00
gabime
5bf8728cfa Fixed example for std_format 2021-12-11 16:22:33 +02:00
semenov_gv
e3e4c4bc95 minor changes added const ref params 2021-12-11 16:09:19 +02:00
Gabi Melman
0c611af552
Merge pull request #2195 from patrickroocks/v1.x-fix-ranges-and-to-hex
Fix usage of ranges and to_hex in the same compile unit
2021-12-01 14:02:30 -08:00
Roocks Patrick (MTN PTT / External)
f304ca3daf code style fixes 2021-12-01 16:37:29 +01:00
Roocks Patrick (MTN PTT / External)
d93cea97ec Fix usage of ranges and to_hex in the same compile unit
When trying to use spdlog/fmt/bin_to_hex.h in the same compile unit as spdlog/fmt/bundled/ranges.h you got a compile error because there was a multiple definitions for iterable classes. This fix renames the begin() and end() getters in dump_info into getBegin()/getEnd() in order to avoid this collision.

Added an example of ranges in example.cpp to show that it actually works (an to_hex example was already there)
2021-12-01 15:37:48 +01:00
Gabi Melman
cabbe65be4
Update README.md 2021-12-01 03:33:26 +02:00
Gabi Melman
8a6b5b9e62
Update README.md 2021-12-01 03:32:08 +02:00
Gabi Melman
c15262c493
Update README.md 2021-12-01 03:29:46 +02:00
Gabi Melman
9a12e4a885
Merge pull request #2194 from rioki/add-default-docu
Add example how to replace default logger.
2021-11-28 08:06:28 -08:00