The use of "final" differed between ansicolor_sink and wincolor_sink,
resulting in the code inheriting from std{err,out}_color_sink classes,
which are defined as one or the other on different platforms, being able
to override most of the functions under non-Windows platforms, but not
under Windows.
This seems gratuitously inconsistent, so just remove all "final"
keywords from both classes, especially because there doesn't seem any
good reason to use it and the other sink classes don't use it (with the
exception of base_sink, which is special).
This also incidentally fixes using "final override" in most places but
"override final" in wincolor_sink.h.
Fixes#3429.
* Move callback function in thread_pool ctor
* Added const qualifiers to logger.h
* Remove unused includes from file_helper-inl.h
* Fix comments and remove unused include from helpers-inl.h
* Fix typo in comment for set_default_logger method.
* Use `std::move` for `old_logger` in `set_default_logger`.
* Use std::move in example
* Wrap `main` content in try block for exception safety.
* Added coverity to ci
* Add test case for #3351 (wrong GMT offset in SunOS/Solaris fallback)
* Fix#3352 (Missing test for Apple / POSIX.1-2024 chooses buggy workaround)
Apple platforms have had the tm_gmtoff-field at least since Mac OS X 10.0,
as are POSIX.1-2024 conforming systems, which are also required to support
it.
This has the unfortunate effect to use the SunOS/Solaris fallback, which
doesn't compute the correct value if the passed value of tm isn't the
current system time, i.e. localtime(::time()) (#3351).
* Fixed GMT offset test
---------
Co-authored-by: toh <toh@ableton.com>
SPDLOG_LEVEL is currently supported to control log levels via
load_env_levels.
This patch adds support for other environment variable names, such as
MYAPP_LEVEL, for load_env_levels.
* Enabled bin_to_hex utest for stdformat, and fixed std::formatter
* fixed usage of \ in macos.yml
* explicitly cast diff variable in test_sink
* moved from ::iterator to decltype
* added fix for custom callbacks
---------
Co-authored-by: Jan Koniarik <veverak@Jans-MacBook-Pro.local>
Include fmtlib's `xchar` header to include `fmt::basic_format_string`.
Otherwise, compilation with an external fmtlib 11.1.1 fails with
```
In file included from include/spdlog/spdlog.h:12:
include/spdlog/common.h:369:49: error: no template named 'basic_format_string' in namespace 'fmt'; did you mean 'std::basic_format_string'?
369 | inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
| ^~~~~
```
Signed-off-by: Christian Blichmann <cblichmann@google.com>