Fast C++ logging library.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
kcgen 59934e59d2
Initialize member variable with default values
This fixes the following GCC warnings:

nk(FILE*, spdlog::color_mode) [with ConsoleMutex = spdlog::details::console_mutex; FILE = FILE]’:
../../submodules/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h:135:48:   required from ‘spdlog::sinks::ansicolor_stdout_sink<ConsoleMutex>::ansicolor_stdout_sink(spdlog::color_mode) [with ConsoleMutex = spdlog::details::console_mutex]’
/usr/include/c++/11/ext/new_allocator.h:156:4:   required from ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>; _Args = {}; _Tp = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>]’
/usr/include/c++/11/bits/alloc_traits.h:512:17:   required from ‘static void std::allocator_traits<std::allocator<_Tp1> >::construct(std::allocator_traits<std::allocator<_Tp1> >::allocator_type&, _Up*, _Args&& ...) [with _Up = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>; _Args = {}; _Tp = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>; std::allocator_traits<std::allocator<_Tp1> >::allocator_type = std::allocator<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex> >]’
/usr/include/c++/11/bits/shared_ptr_base.h:519:39:   required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {}; _Tp = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>; _Alloc = std::allocator<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex> >; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/11/bits/shared_ptr_base.h:650:16:   required from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>; _Alloc = std::allocator<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex> >; _Args = {}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/11/bits/shared_ptr_base.h:1337:14:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex> >; _Args = {}; _Tp = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/11/bits/shared_ptr.h:409:59:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex> >; _Args = {}; _Tp = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>]’
/usr/include/c++/11/bits/shared_ptr.h:860:14:   required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>; _Alloc = std::allocator<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex> >; _Args = {}]’
/usr/include/c++/11/bits/shared_ptr.h:876:39:   required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>; _Args = {}]’
../../submodules/spdlog/include/spdlog/details/registry-inl.h:42:72:   required from here
../../submodules/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h:17:15: warning: ‘spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::should_do_colors_’ should be initialized in the member initialization list [-Weffc++]
   17 | SPDLOG_INLINE ansicolor_sink<ConsoleMutex>::ansicolor_sink(FILE *target_file, color_mode mode)
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h:17:15: warning: ‘spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::colors_’ should be initialized in the member initialization list

../../submodules/spdlog/include/spdlog/details/log_msg.h: In instantiation of ‘void std::_Construct(_Tp*, _Args&& ...) [with _Tp = spdlog::details::log_msg_buffer; _Args = {}]’:
/usr/include/c++/11/bits/stl_uninitialized.h:579:18:   required from ‘static _ForwardIterator std::__uninitialized_default_n_1<_TrivialValueType>::__uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = spdlog::details::log_msg_buffer*; _Size = long unsigned int; bool _TrivialValueType = false]’
/usr/include/c++/11/bits/stl_uninitialized.h:640:20:   required from ‘_ForwardIterator std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = spdlog::details::log_msg_buffer*; _Size = long unsigned int]’
/usr/include/c++/11/bits/stl_uninitialized.h:704:44:   required from ‘_ForwardIterator std::__uninitialized_default_n_a(_ForwardIterator, _Size, std::allocator<_Tp>&) [with _ForwardIterator = spdlog::details::log_msg_buffer*; _Size = long unsigned int; _Tp = spdlog::details::log_msg_buffer]’
/usr/include/c++/11/bits/stl_vector.h:1606:36:   required from ‘void std::vector<_Tp, _Alloc>::_M_default_initialize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = spdlog::details::log_msg_buffer; _Alloc = std::allocator<spdlog::details::log_msg_buffer>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/11/bits/stl_vector.h:512:9:   required from ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = spdlog::details::log_msg_buffer; _Alloc = std::allocator<spdlog::details::log_msg_buffer>; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<spdlog::details::log_msg_buffer>]’
../../submodules/spdlog/include/spdlog/details/circular_q.h:29:11:   required from ‘spdlog::details::circular_q<T>::circular_q(size_t) [with T = spdlog::details::log_msg_buffer; size_t = long unsigned int]’
../../submodules/spdlog/include/spdlog/details/backtracer-inl.h:37:48:   required from here
../../submodules/spdlog/include/spdlog/details/log_msg.h:13:5: warning: ‘spdlog::details::log_msg::logger_name’ should be initialized in the member initialization list [-Weffc++]
   13 |     log_msg() = default;
      |     ^~~~~~~
../../submodules/spdlog/include/spdlog/details/log_msg.h:13:5: warning: ‘spdlog::details::log_msg::time’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/log_msg.h:13:5: warning: ‘spdlog::details::log_msg::source’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/log_msg.h:13:5: warning: ‘spdlog::details::log_msg::payload’ should be initialized in the member initialization list [-Weffc++]

../../submodules/spdlog/include/spdlog/fmt/bundled/core.h: In instantiation of ‘fmt::v8::detail::buffer<T>::buffer(size_t) [with T = char; size_t = long unsigned int]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:915:71:   required from ‘fmt::v8::detail::iterator_buffer<std::back_insert_iterator<_Container>, typename std::enable_if<fmt::v8::is_contiguous<T>::value, typename Container::value_type>::type>::iterator_buffer(Container&) [with Container = fmt::v8::basic_memory_buffer<char, 250>; typename std::enable_if<fmt::v8::is_contiguous<T>::value, typename Container::value_type>::type = char; typename Container::value_type = char]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:917:43:   required from ‘fmt::v8::detail::iterator_buffer<std::back_insert_iterator<_Container>, typename std::enable_if<fmt::v8::is_contiguous<T>::value, typename Container::value_type>::type>::iterator_buffer(std::back_insert_iterator<_Container>, size_t) [with Container = fmt::v8::basic_memory_buffer<char, 250>; typename std::enable_if<fmt::v8::is_contiguous<T>::value, typename Container::value_type>::type = char; typename Container::value_type = char; size_t = long unsigned int]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:950:10:   required from ‘fmt::v8::detail::iterator_buffer<OutputIt, T> fmt::v8::detail::get_buffer(OutputIt) [with T = char; OutputIt = std::back_insert_iterator<fmt::v8::basic_memory_buffer<char, 250> >]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2902:32:   required from ‘OutputIt fmt::v8::vformat_to(OutputIt, fmt::v8::string_view, fmt::v8::format_args) [with OutputIt = std::back_insert_iterator<fmt::v8::basic_memory_buffer<char, 250> >; typename std::enable_if<fmt::v8::detail::is_output_iterator<OutputIt, char>::value, int>::type <anonymous> = 0; fmt::v8::string_view = fmt::v8::basic_string_view<char>; fmt::v8::format_args = fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2923:20:   required from ‘OutputIt fmt::v8::format_to(OutputIt, fmt::v8::format_string<T ...>, T&& ...) [with OutputIt = std::back_insert_iterator<fmt::v8::basic_memory_buffer<char, 250> >; T = {int&}; typename std::enable_if<fmt::v8::detail::is_output_iterator<OutputIt, char>::value, int>::type <anonymous> = 0; fmt::v8::format_string<T ...> = fmt::v8::basic_format_string<char, int&>]’
../../submodules/spdlog/include/spdlog/details/fmt_helper.h:58:23:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:758:3: warning: ‘fmt::v8::detail::buffer<char>::ptr_’ should be initialized in the member initialization list [-Weffc++]

../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2368:29:   required from ‘int fmt::v8::detail::format_float(T, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer<char>&) [with T = long double]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:1809:25:   required from ‘OutputIt fmt::v8::detail::write(OutputIt, T, fmt::v8::basic_format_specs<Char>, fmt::v8::detail::locale_ref) [with Char = char; OutputIt = fmt::v8::appender; T = long double; typename std::enable_if<std::is_floating_point<T>::value, int>::type <anonymous> = 0]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:1846:15:   required from ‘OutputIt fmt::v8::detail::write(OutputIt, T) [with Char = char; OutputIt = fmt::v8::appender; T = long double; typename std::enable_if<(std::is_floating_point<T>::value && (! std::integral_constant<bool, (std::numeric_limits<T>::is_iec559 && (sizeof (T) <= sizeof (double)))>::value)), int>::type <anonymous> = 0]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:1969:23:   required from ‘fmt::v8::detail::default_arg_formatter<Char>::iterator fmt::v8::detail::default_arg_formatter<Char>::operator()(T) [with T = long double; Char = char; fmt::v8::detail::default_arg_formatter<Char>::iterator = fmt::v8::appender]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:1473:15:   required from ‘constexpr decltype (vis(0)) fmt::v8::visit_format_arg(Visitor&&, const fmt::v8::basic_format_arg<Context>&) [with Visitor = fmt::v8::detail::default_arg_formatter<char>; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; decltype (vis(0)) = fmt::v8::appender]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:2649:5:   required from ‘void fmt::v8::detail::vformat_to(fmt::v8::detail::buffer<T>&, fmt::v8::basic_string_view<Char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type, typename fmt::v8::type_identity<T>::type> >, fmt::v8::detail::locale_ref) [with Char = char; typename fmt::v8::type_identity<T>::type = char; typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type = fmt::v8::appender]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2565:21:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:202:39: warning: ‘fmt::v8::detail::fp::f’ should be initialized in the member initialization list [-Weffc++]
  202 |   template <typename Double> explicit fp(Double d) { assign(d); }
      |                                       ^~
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:202:39: warning: ‘fmt::v8::detail::fp::e’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h: In instantiation of ‘fmt::v8::detail::fp::fp(Double) [with Double = double]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2368:29:   required from ‘int fmt::v8::detail::format_float(T, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer<char>&) [with T = double]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:1809:25:   required from ‘OutputIt fmt::v8::detail::write(OutputIt, T, fmt::v8::basic_format_specs<Char>, fmt::v8::detail::locale_ref) [with Char = char; OutputIt = fmt::v8::appender; T = float; typename std::enable_if<std::is_floating_point<T>::value, int>::type <anonymous> = 0]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:1989:25:   required from ‘constexpr fmt::v8::detail::arg_formatter<Char>::iterator fmt::v8::detail::arg_formatter<Char>::operator()(T) [with T = float; Char = char; fmt::v8::detail::arg_formatter<Char>::iterator = fmt::v8::appender]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:1469:15:   required from ‘constexpr decltype (vis(0)) fmt::v8::visit_format_arg(Visitor&&, const fmt::v8::basic_format_arg<Context>&) [with Visitor = fmt::v8::detail::arg_formatter<char>&; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; decltype (vis(0)) = fmt::v8::appender]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:2702:42:   required from ‘const Char* fmt::v8::detail::vformat_to(fmt::v8::detail::buffer<T>&, fmt::v8::basic_string_view<Char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type, typename fmt::v8::type_identity<T>::type> >, fmt::v8::detail::locale_ref)::format_handler::on_format_specs(int, const Char*, const Char*) [with Char = char]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:2705:3:   required from ‘void fmt::v8::detail::vformat_to(fmt::v8::detail::buffer<T>&, fmt::v8::basic_string_view<Char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type, typename fmt::v8::type_identity<T>::type> >, fmt::v8::detail::locale_ref) [with Char = char; typename fmt::v8::type_identity<T>::type = char; typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type = fmt::v8::appender]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2565:21:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:202:39: warning: ‘fmt::v8::detail::fp::f’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:202:39: warning: ‘fmt::v8::detail::fp::e’ should be initialized in the member initialization list [-Weffc++]

../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2450:12: note: synthesized method ‘constexpr fmt::v8::formatter<const char*, char, void>::formatter()’ first required here
 2450 |   auto f = conditional_t<has_formatter<mapped_type, context>::value,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2451 |                          formatter<mapped_type, char_type>,
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2452 |                          fallback_formatter<T, char_type>>();
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h: In instantiation of ‘constexpr decltype (ctx.begin()) fmt::v8::detail::parse_format_specs(ParseContext&) [with T = int; ParseContext = fmt::v8::detail::compile_parse_context<char, fmt::v8::detail::error_handler>; decltype (ctx.begin()) = const char*]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2696:9:   required from ‘constexpr fmt::v8::detail::format_string_checker<Char, ErrorHandler, Args>::format_string_checker(fmt::v8::basic_string_view<Char>, ErrorHandler) [with Char = char; ErrorHandler = fmt::v8::detail::error_handler; Args = {char [7], int}]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2737:33:   required from ‘void fmt::v8::detail::check_format_string(S) [with <template-parameter-1-1> = {const char (&)[7], int&}; S = fmt::v8::detail::format_error_code(fmt::v8::detail::buffer<char>&, int, fmt::v8::string_view)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<fmt::v8::is_compile_string<S>::value, int>::type <anonymous> = 0]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2856:41:   required from ‘fmt::v8::basic_format_string<Char, Args>::basic_format_string(const S&) [with S = fmt::v8::detail::format_error_code(fmt::v8::detail::buffer<char>&, int, fmt::v8::string_view)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<std::is_convertible<const S&, fmt::v8::basic_string_view<Char> >::value, int>::type <anonymous> = 0; Char = char; Args = {const char (&)[7], int&}]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:75:12:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2756:8: warning: ‘fmt::v8::formatter<int, char, void>::specs_’ should be initialized in the member initialization list [-Weffc++]
 2756 | struct formatter<T, Char,
      |        ^~~~~~~~~~~~~~~~~~
 2757 |                  enable_if_t<detail::type_constant<T, Char>::value !=
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2758 |                              detail::type::custom_type>> {
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2450:12: note: synthesized method ‘constexpr fmt::v8::formatter<int, char, void>::formatter()’ first required here
 2450 |   auto f = conditional_t<has_formatter<mapped_type, context>::value,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2451 |                          formatter<mapped_type, char_type>,
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2452 |                          fallback_formatter<T, char_type>>();
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h: In instantiation of ‘constexpr decltype (ctx.begin()) fmt::v8::detail::parse_format_specs(ParseContext&) [with T = unsigned int; ParseContext = fmt::v8::detail::compile_parse_context<char, fmt::v8::detail::error_handler>; decltype (ctx.begin()) = const char*]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2696:9:   required from ‘constexpr fmt::v8::detail::format_string_checker<Char, ErrorHandler, Args>::format_string_checker(fmt::v8::basic_string_view<Char>, ErrorHandler) [with Char = char; ErrorHandler = fmt::v8::detail::error_handler; Args = {unsigned int}]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2737:33:   required from ‘void fmt::v8::detail::check_format_string(S) [with <template-parameter-1-1> = {unsigned int&}; S = fmt::v8::formatter<fmt::v8::detail::bigint>::format(const fmt::v8::detail::bigint&, fmt::v8::format_context&)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<fmt::v8::is_compile_string<S>::value, int>::type <anonymous> = 0]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2856:41:   required from ‘fmt::v8::basic_format_string<Char, Args>::basic_format_string(const S&) [with S = fmt::v8::formatter<fmt::v8::detail::bigint>::format(const fmt::v8::detail::bigint&, fmt::v8::format_context&)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<std::is_convertible<const S&, fmt::v8::basic_string_view<Char> >::value, int>::type <anonymous> = 0; Char = char; Args = {unsigned int&}]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2514:24:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2756:8: warning: ‘fmt::v8::formatter<unsigned int, char, void>::specs_’ should be initialized in the member initialization list [-Weffc++]
 2756 | struct formatter<T, Char,
      |        ^~~~~~~~~~~~~~~~~~
 2757 |                  enable_if_t<detail::type_constant<T, Char>::value !=
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2758 |                              detail::type::custom_type>> {
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2450:12: note: synthesized method ‘constexpr fmt::v8::formatter<unsigned int, char, void>::formatter()’ first required here

../../submodules/spdlog/include/spdlog/fmt/bundled/core.h: In instantiation of ‘constexpr decltype (ctx.begin()) fmt::v8::detail::parse_format_specs(ParseContext&) [with T = fmt::v8::basic_string_view<char>; ParseContext = fmt::v8::detail::compile_parse_context<char, fmt::v8::detail::error_handler>; decltype (ctx.begin()) = const char*]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2696:9:   required from ‘constexpr fmt::v8::detail::format_string_checker<Char, ErrorHandler, Args>::format_string_checker(fmt::v8::basic_string_view<Char>, ErrorHandler) [with Char = char; ErrorHandler = fmt::v8::detail::error_handler; Args = {fmt::v8::basic_string_view<char>, char [3]}]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2737:33:   required from ‘void fmt::v8::detail::check_format_string(S) [with <template-parameter-1-1> = {fmt::v8::basic_string_view<char>&, const char (&)[3]}; S = fmt::v8::detail::format_error_code(fmt::v8::detail::buffer<char>&, int, fmt::v8::string_view)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<fmt::v8::is_compile_string<S>::value, int>::type <anonymous> = 0]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2856:41:   required from ‘fmt::v8::basic_format_string<Char, Args>::basic_format_string(const S&) [with S = fmt::v8::detail::format_error_code(fmt::v8::detail::buffer<char>&, int, fmt::v8::string_view)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<std::is_convertible<const S&, fmt::v8::basic_string_view<Char> >::value, int>::type <anonymous> = 0; Char = char; Args = {fmt::v8::basic_string_view<char>&, const char (&)[3]}]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:74:14:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2756:8: warning: ‘fmt::v8::formatter<fmt::v8::basic_string_view<char>, char, void>::specs_’ should be initialized in the member initialization list [-Weffc++]
 2756 | struct formatter<T, Char,
      |        ^~~~~~~~~~~~~~~~~~
 2757 |                  enable_if_t<detail::type_constant<T, Char>::value !=
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2758 |                              detail::type::custom_type>> {
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:1960:8: warning: ‘fmt::v8::detail::dynamic_format_specs<char>::width_ref’ should be initialized in the member initialization list [-Weffc++]
 1960 | struct dynamic_format_specs : basic_format_specs<Char> {
      |        ^~~~~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:1960:8: warning: ‘fmt::v8::detail::dynamic_format_specs<char>::precision_ref’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2756:8: note: synthesized method ‘constexpr fmt::v8::detail::dynamic_format_specs<char>::dynamic_format_specs()’ first required here
 2756 | struct formatter<T, Char,
      |        ^~~~~~~~~~~~~~~~~~
 2757 |                  enable_if_t<detail::type_constant<T, Char>::value !=
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2758 |                              detail::type::custom_type>> {
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2450:12: note: synthesized method ‘constexpr fmt::v8::formatter<fmt::v8::basic_string_view<char>, char, void>::formatter()’ first required here
 2450 |   auto f = conditional_t<has_formatter<mapped_type, context>::value,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2451 |                          formatter<mapped_type, char_type>,
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2452 |                          fallback_formatter<T, char_type>>();
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h: In instantiation of ‘constexpr decltype (ctx.begin()) fmt::v8::detail::parse_format_specs(ParseContext&) [with T = char [3]; ParseContext = fmt::v8::detail::compile_parse_context<char, fmt::v8::detail::error_handler>; decltype (ctx.begin()) = const char*]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2696:9:   required from ‘constexpr fmt::v8::detail::format_string_checker<Char, ErrorHandler, Args>::format_string_checker(fmt::v8::basic_string_view<Char>, ErrorHandler) [with Char = char; ErrorHandler = fmt::v8::detail::error_handler; Args = {fmt::v8::basic_string_view<char>, char [3]}]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2737:33:   required from ‘void fmt::v8::detail::check_format_string(S) [with <template-parameter-1-1> = {fmt::v8::basic_string_view<char>&, const char (&)[3]}; S = fmt::v8::detail::format_error_code(fmt::v8::detail::buffer<char>&, int, fmt::v8::string_view)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<fmt::v8::is_compile_string<S>::value, int>::type <anonymous> = 0]’
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2856:41:   required from ‘fmt::v8::basic_format_string<Char, Args>::basic_format_string(const S&) [with S = fmt::v8::detail::format_error_code(fmt::v8::detail::buffer<char>&, int, fmt::v8::string_view)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<std::is_convertible<const S&, fmt::v8::basic_string_view<Char> >::value, int>::type <anonymous> = 0; Char = char; Args = {fmt::v8::basic_string_view<char>&, const char (&)[3]}]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:74:14:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:2756:8: warning: ‘fmt::v8::formatter<const char*, char, void>::specs_’ should be initialized in the member initialization list [-Weffc++]
 2756 | struct formatter<T, Char,
      |        ^~~~~~~~~~~~~~~~~~
 2757 |                  enable_if_t<detail::type_constant<T, Char>::value !=
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2758 |                              detail::type::custom_type>> {

../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = spdlog::details::aggregate_formatter; _Args = {}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<spdlog::details::aggregate_formatter, std::default_delete<spdlog::details::aggregate_formatter> >]’:
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h:1385:80:   required from here
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h:714:5: warning: ‘spdlog::details::aggregate_formatter::str_’ should be initialized in the member initialization list [-Weffc++]
  714 |     aggregate_formatter() = default;

../../submodules/spdlog/include/spdlog/logger.h: In instantiation of ‘spdlog::logger::logger(std::string, It, It) [with It = const std::shared_ptr<spdlog::sinks::sink>*; std::string = std::__cxx11::basic_string<char>]’:
../../submodules/spdlog/include/spdlog/logger.h:77:61:   required from here
../../submodules/spdlog/include/spdlog/logger.h:65:5: warning: ‘spdlog::logger::tracer_’ should be initialized in the member initialization list [-Weffc++]
   65 |     logger(std::string name, It begin, It end)
      |     ^~~~~~

../../submodules/spdlog/include/spdlog/fmt/bundled/format.h: In instantiation of ‘fmt::v8::basic_memory_buffer<T, SIZE, Allocator>::basic_memory_buffer(fmt::v8::basic_memory_buffer<T, SIZE, Allocator>&&) [with T = char; long unsigned int SIZE = 250; Allocator = std::allocator<char>]’:
../../submodules/spdlog/include/spdlog/details/log_msg_buffer-inl.h:29:104:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:676:3: warning: ‘fmt::v8::basic_memory_buffer<char, 250>::alloc_’ should be initialized in the member initialization list [-Weffc++]
  676 |   basic_memory_buffer(basic_memory_buffer&& other) FMT_NOEXCEPT { move(other); }
      |   ^~~~~~~~~~~~~~~~~~~

../../submodules/spdlog/include/spdlog/fmt/bundled/core.h: In instantiation of ‘constexpr fmt::v8::basic_format_arg<Context>::basic_format_arg() [with Context = fmt::v8::basic_format_context<fmt::v8::appender, char>]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:1815:16:   required from ‘constexpr fmt::v8::basic_format_args<Context>::format_arg fmt::v8::basic_format_args<Context>::get(int) const [with Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; fmt::v8::basic_format_args<Context>::format_arg = fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char> >]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:2647:24:   required from ‘void fmt::v8::detail::vformat_to(fmt::v8::detail::buffer<T>&, fmt::v8::basic_string_view<Char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type, typename fmt::v8::type_identity<T>::type> >, fmt::v8::detail::locale_ref) [with Char = char; typename fmt::v8::type_identity<T>::type = char; typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type = fmt::v8::appender]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2565:21:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:1425:13: warning: ‘fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char> >::value_’ should be initialized in the member initialization list [-Weffc++]
 1425 |   constexpr basic_format_arg() : type_(detail::type::none_type) {}
      |             ^~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h: In instantiation of ‘constexpr fmt::v8::basic_format_specs<Char>::basic_format_specs() [with Char = char]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:2695:12:   required from ‘const Char* fmt::v8::detail::vformat_to(fmt::v8::detail::buffer<T>&, fmt::v8::basic_string_view<Char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type, typename fmt::v8::type_identity<T>::type> >, fmt::v8::detail::locale_ref)::format_handler::on_format_specs(int, const Char*, const Char*) [with Char = char]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:2705:3:   required from ‘void fmt::v8::detail::vformat_to(fmt::v8::detail::buffer<T>&, fmt::v8::basic_string_view<Char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type, typename fmt::v8::type_identity<T>::type> >, fmt::v8::detail::locale_ref) [with Char = char; typename fmt::v8::type_identity<T>::type = char; typename std::conditional<std::is_same<typename fmt::v8::type_identity<T>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<typename fmt::v8::type_identity<T>::type> > >::type = fmt::v8::appender]’
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2565:21:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:1915:13: warning: ‘fmt::v8::basic_format_specs<char>::fill’ should be initialized in the member initialization list [-Weffc++]
 1915 |   constexpr basic_format_specs()
      |             ^~~~~~~~~~~~~~~~~~

../../submodules/spdlog/include/spdlog/fmt/bundled/format.h: In instantiation of ‘fmt::v8::basic_memory_buffer<T, SIZE, Allocator>::basic_memory_buffer(fmt::v8::basic_memory_buffer<T, SIZE, Allocator>&&) [with T = char; long unsigned int SIZE = 500; Allocator = std::allocator<char>]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2564:31:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:676:3: warning: ‘fmt::v8::basic_memory_buffer<char>::alloc_’ should be initialized in the member initialization list [-Weffc++]
  676 |   basic_memory_buffer(basic_memory_buffer&& other) FMT_NOEXCEPT { move(other); }
      |   ^~~~~~~~~~~~~~~~~~~

../../submodules/spdlog/include/spdlog/fmt/bundled/core.h: In instantiation of ‘fmt::v8::basic_string_view<Char>::basic_string_view(const Char*) [with Char = char]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2549:20:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/core.h:460:3: warning: ‘fmt::v8::basic_string_view<char>::size_’ should be initialized in the member initialization list [-Weffc++]
  460 |   basic_string_view(const Char* s) : data_(s) {
      |   ^~~~~~~~~~~~~~~~~

../../submodules/spdlog/include/spdlog/fmt/bundled/format.h: In instantiation of ‘fmt::v8::basic_memory_buffer<T, SIZE, Allocator>::basic_memory_buffer(fmt::v8::basic_memory_buffer<T, SIZE, Allocator>&&) [with T = unsigned int; long unsigned int SIZE = 32; Allocator = std::allocator<unsigned int>]’:
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:544:69:   required from here
../../submodules/spdlog/include/spdlog/fmt/bundled/format.h:676:3: warning: ‘fmt::v8::basic_memory_buffer<unsigned int, 32>::alloc_’ should be initialized in the member initialization list [-Weffc++]
  676 |   basic_memory_buffer(basic_memory_buffer&& other) FMT_NOEXCEPT { move(other); }
      |   ^~~~~~~~~~~~~~~~~~~

../../submodules/spdlog/include/spdlog/details/registry-inl.h: In constructor ‘spdlog::details::registry::registry()’:
../../submodules/spdlog/include/spdlog/details/registry-inl.h:33:15: warning: ‘spdlog::details::registry::logger_map_mutex_’ should be initialized in the member initialization list [-Weffc++]
   33 | SPDLOG_INLINE registry::registry()
      |               ^~~~~~~~
../../submodules/spdlog/include/spdlog/details/registry-inl.h:33:15: warning: ‘spdlog::details::registry::flusher_mutex_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/registry-inl.h:33:15: warning: ‘spdlog::details::registry::tp_mutex_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/registry-inl.h:33:15: warning: ‘spdlog::details::registry::loggers_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/registry-inl.h:33:15: warning: ‘spdlog::details::registry::log_levels_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/registry-inl.h:33:15: warning: ‘spdlog::details::registry::err_handler_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/registry-inl.h:33:15: warning: ‘spdlog::details::registry::tp_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/registry-inl.h:33:15: warning: ‘spdlog::details::registry::periodic_flusher_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/registry-inl.h:33:15: warning: ‘spdlog::details::registry::default_logger_’ should be initialized in the member initialization list [-Weffc++]

../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h: In constructor ‘spdlog::details::full_formatter::full_formatter(spdlog::details::padding_info)’:
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h:932:14: warning: ‘spdlog::details::full_formatter::cached_datetime_’ should be initialized in the member initialization list [-Weffc++]
  932 |     explicit full_formatter(padding_info padinfo)
      |              ^~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h: In constructor ‘spdlog::pattern_formatter::pattern_formatter(std::string, spdlog::pattern_time_type, std::string, spdlog::pattern_formatter::custom_flags)’:
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h:1017:15: warning: ‘spdlog::pattern_formatter::cached_tm_’ should be initialized in the member initialization list [-Weffc++]
 1017 | SPDLOG_INLINE pattern_formatter::pattern_formatter(
      |               ^~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h:1017:15: warning: ‘spdlog::pattern_formatter::formatters_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h: In constructor ‘spdlog::pattern_formatter::pattern_formatter(spdlog::pattern_time_type, std::string)’:
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h:1030:15: warning: ‘spdlog::pattern_formatter::cached_tm_’ should be initialized in the member initialization list [-Weffc++]
 1030 | SPDLOG_INLINE pattern_formatter::pattern_formatter(pattern_time_type time_type, std::string eol)
      |               ^~~~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h:1030:15: warning: ‘spdlog::pattern_formatter::formatters_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h:1030:15: warning: ‘spdlog::pattern_formatter::custom_handlers_’ should be initialized in the member initialization list [-Weffc++]

../../submodules/spdlog/include/spdlog/pattern_formatter.h: In constructor ‘constexpr spdlog::details::flag_formatter::flag_formatter()’:
../../submodules/spdlog/include/spdlog/pattern_formatter.h:56:5: warning: ‘spdlog::details::flag_formatter::padinfo_’ should be initialized in the member initialization list [-Weffc++]
   56 |     flag_formatter() = default;
      |     ^~~~~~~~~~~~~~

../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h: In constructor ‘spdlog::details::scoped_padder::scoped_padder(size_t, const spdlog::details::padding_info&, spdlog::memory_buf_t&)’:
../../submodules/spdlog/include/spdlog/pattern_formatter-inl.h:40:5: warning: ‘spdlog::details::scoped_padder::remaining_pad_’ should be initialized in the member initialization list [-Weffc++]
   40 |     scoped_padder(size_t wrapped_size, const padding_info &padinfo, memory_buf_t &dest)
      |     ^~~~~~~~~~~~~

../../submodules/spdlog/include/spdlog/details/backtracer.h: In constructor ‘spdlog::details::backtracer::backtracer()’:
../../submodules/spdlog/include/spdlog/details/backtracer.h:25:5: warning: ‘spdlog::details::backtracer::mutex_’ should be initialized in the member initialization list [-Weffc++]
   25 |     backtracer() = default;
      |     ^~~~~~~~~~
../../submodules/spdlog/include/spdlog/details/backtracer.h:25:5: warning: ‘spdlog::details::backtracer::messages_’ should be initialized in the member initialization list [-Weffc++]

../../submodules/spdlog/include/spdlog/logger.h: In constructor ‘spdlog::logger::logger(std::string)’:
../../submodules/spdlog/include/spdlog/logger.h:58:14: warning: ‘spdlog::logger::tracer_’ should be initialized in the member initialization list [-Weffc++]
   58 |     explicit logger(std::string name)

../../submodules/spdlog/include/spdlog/details/backtracer-inl.h: In constructor ‘spdlog::details::backtracer::backtracer(spdlog::details::backtracer&&)’:
../../submodules/spdlog/include/spdlog/details/backtracer-inl.h:18:15: warning: ‘spdlog::details::backtracer::mutex_’ should be initialized in the member initialization list [-Weffc++]
   18 | SPDLOG_INLINE backtracer::backtracer(backtracer &&other) SPDLOG_NOEXCEPT
      |               ^~~~~~~~~~
../../submodules/spdlog/include/spdlog/details/backtracer-inl.h:18:15: warning: ‘spdlog::details::backtracer::messages_’ should be initialized in the member initialization list [-Weffc++]

../../submodules/spdlog/include/spdlog/details/circular_q.h: In constructor ‘spdlog::details::circular_q<T>::circular_q() [with T = spdlog::details::log_msg_buffer]’:
../../submodules/spdlog/include/spdlog/details/circular_q.h:25:5: warning: ‘spdlog::details::circular_q<spdlog::details::log_msg_buffer>::v_’ should be initialized in the member initialization list [-Weffc++]
   25 |     circular_q() = default;
      |     ^~~~~~~~~~

../../submodules/spdlog/include/spdlog/details/backtracer-inl.h: In copy constructor ‘spdlog::details::backtracer::backtracer(const spdlog::details::backtracer&)’:
../../submodules/spdlog/include/spdlog/details/backtracer-inl.h:11:15: warning: ‘spdlog::details::backtracer::mutex_’ should be initialized in the member initialization list [-Weffc++]
   11 | SPDLOG_INLINE backtracer::backtracer(const backtracer &other)
      |               ^~~~~~~~~~
../../submodules/spdlog/include/spdlog/details/backtracer-inl.h:11:15: warning: ‘spdlog::details::backtracer::messages_’ should be initialized in the member initialization list [-Weffc++]

../../submodules/spdlog/include/spdlog/details/log_msg_buffer-inl.h: In constructor ‘spdlog::details::log_msg_buffer::log_msg_buffer(const spdlog::details::log_msg&)’:
../../submodules/spdlog/include/spdlog/details/log_msg_buffer-inl.h:13:15: warning: ‘spdlog::details::log_msg_buffer::buffer’ should be initialized in the member initialization list [-Weffc++]
   13 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(const log_msg &orig_msg)
      |               ^~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/details/log_msg_buffer-inl.h: In copy constructor ‘spdlog::details::log_msg_buffer::log_msg_buffer(const spdlog::details::log_msg_buffer&)’:
../../submodules/spdlog/include/spdlog/details/log_msg_buffer-inl.h:21:15: warning: ‘spdlog::details::log_msg_buffer::buffer’ should be initialized in the member initialization list [-Weffc++]
   21 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(const log_msg_buffer &other)
      |               ^~~~~~~~~~~~~~

../../submodules/spdlog/include/spdlog/details/os-inl.h: In function ‘int spdlog::details::os::pid()’:
../../submodules/spdlog/include/spdlog/details/os-inl.h:399:12: warning: useless cast to type ‘int’ [-Wuseless-cast]
  399 |     return static_cast<int>(::getpid());
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

../../submodules/spdlog/include/spdlog/details/periodic_worker-inl.h: In constructor ‘spdlog::details::periodic_worker::periodic_worker(const std::function<void()>&, std::chrono::seconds)’:
../../submodules/spdlog/include/spdlog/details/periodic_worker-inl.h:13:15: warning: ‘spdlog::details::periodic_worker::active_’ should be initialized in the member initialization list [-Weffc++]
   13 | SPDLOG_INLINE periodic_worker::periodic_worker(const std::function<void()> &callback_fun, std::chrono::seconds interval)
      |               ^~~~~~~~~~~~~~~
../../submodules/spdlog/include/spdlog/details/periodic_worker-inl.h:13:15: warning: ‘spdlog::details::periodic_worker::worker_thread_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/periodic_worker-inl.h:13:15: warning: ‘spdlog::details::periodic_worker::mutex_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/details/periodic_worker-inl.h:13:15: warning: ‘spdlog::details::periodic_worker::cv_’ should be initialized in the member initialization list [-Weffc++]

../../submodules/spdlog/include/spdlog/common-inl.h: In constructor ‘spdlog::spdlog_ex::spdlog_ex(const string&, int)’:
../../submodules/spdlog/include/spdlog/common-inl.h:56:15: warning: ‘spdlog::spdlog_ex::msg_’ should be initialized in the member initialization list [-Weffc++]
   56 | SPDLOG_INLINE spdlog_ex::spdlog_ex(const std::string &msg, int last_errno)
      |               ^~~~~~~~~

../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h: In constructor ‘fmt::v8::detail::bigint::bigint()’:
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:433:3: warning: ‘fmt::v8::detail::bigint::bigits_’ should be initialized in the member initialization list [-Weffc++]
  433 |   bigint() : exp_(0) {}
      |   ^~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h: In constructor ‘fmt::v8::detail::bigint::bigint(uint64_t)’:
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:434:12: warning: ‘fmt::v8::detail::bigint::bigits_’ should be initialized in the member initialization list [-Weffc++]
  434 |   explicit bigint(uint64_t n) { assign(n); }
      |            ^~~~~~
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:434:12: warning: ‘fmt::v8::detail::bigint::exp_’ should be initialized in the member initialization list [-Weffc++]
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h: In constructor ‘fmt::v8::detail::utf8_to_utf16::utf8_to_utf16(fmt::v8::string_view)’:
../../submodules/spdlog/include/spdlog/fmt/bundled/format-inl.h:2527:10: warning: ‘fmt::v8::detail::utf8_to_utf16::buffer_’ should be initialized in the member initialization list [-Weffc++]
 2527 | FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) {
4 years ago
bench clang-format 4 years ago
cmake Ensure exported package is relocatable 4 years ago
example Updated example 4 years ago
include/spdlog Initialize member variable with default values 4 years ago
logos Enabled warning on examples only if built as part of spdlog 6 years ago
scripts Update extract_version.py 4 years ago
src clang-format 4 years ago
tests replace FormatString template argument with fmt::basic_format_string 4 years ago
.clang-format Update clang format to format cpp macros 4 years ago
.clang-tidy Update .clang-tidy 5 years ago
.gitattributes Disable automatic handling of line endings 6 years ago
.gitignore Update .gitignore 6 years ago
.travis.yml Update .travis.yml 4 years ago
CMakeLists.txt Ensure exported package is relocatable 4 years ago
INSTALL Update INSTALL 6 years ago
LICENSE Fix typos. 5 years ago
README.md Update README.md 4 years ago
appveyor.yml Update appveyor.yml 4 years ago

README.md

spdlog

Very fast, header-only/compiled, C++ logging library. Build Status  Build status Release

Install

Header only version

Copy the include folder to your build tree and use a C++11 compiler.

$ git clone https://github.com/gabime/spdlog.git
$ cd spdlog && mkdir build && cd build
$ cmake .. && make -j

see example CMakeLists.txt on how to use.

Platforms

  • Linux, FreeBSD, OpenBSD, Solaris, AIX
  • Windows (msvc 2013+, cygwin)
  • macOS (clang 3.5+)
  • Android

Package managers:

  • Debian: sudo apt install libspdlog-dev
  • Homebrew: brew install spdlog
  • MacPorts: sudo port install spdlog
  • FreeBSD: cd /usr/ports/devel/spdlog/ && make install clean
  • Fedora: dnf install spdlog
  • Gentoo: emerge dev-libs/spdlog
  • Arch Linux: pacman -S spdlog
  • vcpkg: vcpkg install spdlog
  • conan: spdlog/[>=1.4.1]
  • conda: conda install -c conda-forge spdlog
  • build2: depends: spdlog ^1.8.2

Features

  • Very fast (see benchmarks below).
  • Headers only or compiled
  • Feature rich formatting, using the excellent fmt library.
  • Asynchronous mode (optional)
  • Custom formatting.
  • Multi/Single threaded loggers.
  • Various log targets:
    • Rotating log files.
    • Daily log files.
    • Console logging (colors supported).
    • syslog.
    • Windows event log.
    • Windows debugger (OutputDebugString(..)).
    • Easily extendable with custom log targets.
  • Log filtering - log levels can be modified in runtime as well as in compile time.
  • Support for loading log levels from argv or from environment var.
  • Backtrace support - store debug messages in a ring buffer and display later on demand.

Usage samples

Basic usage

#include "spdlog/spdlog.h"

int main() 
{
    spdlog::info("Welcome to spdlog!");
    spdlog::error("Some error message with arg: {}", 1);
    
    spdlog::warn("Easy padding in numbers like {:08d}", 12);
    spdlog::critical("Support for int: {0:d};  hex: {0:x};  oct: {0:o}; bin: {0:b}", 42);
    spdlog::info("Support for floats {:03.2f}", 1.23456);
    spdlog::info("Positional args are {1} {0}..", "too", "supported");
    spdlog::info("{:<30}", "left aligned");
    
    spdlog::set_level(spdlog::level::debug); // Set global log level to debug
    spdlog::debug("This message should be displayed..");    
    
    // change log pattern
    spdlog::set_pattern("[%H:%M:%S %z] [%n] [%^---%L---%$] [thread %t] %v");
    
    // Compile time log levels
    // define SPDLOG_ACTIVE_LEVEL to desired level
    SPDLOG_TRACE("Some trace message with param {}", 42);
    SPDLOG_DEBUG("Some debug message");
}


Create stdout/stderr logger object

#include "spdlog/spdlog.h"
#include "spdlog/sinks/stdout_color_sinks.h"
void stdout_example()
{
    // create color multi threaded logger
    auto console = spdlog::stdout_color_mt("console");    
    auto err_logger = spdlog::stderr_color_mt("stderr");    
    spdlog::get("console")->info("loggers can be retrieved from a global registry using the spdlog::get(logger_name)");
}

Basic file logger

#include "spdlog/sinks/basic_file_sink.h"
void basic_logfile_example()
{
    try 
    {
        auto logger = spdlog::basic_logger_mt("basic_logger", "logs/basic-log.txt");
    }
    catch (const spdlog::spdlog_ex &ex)
    {
        std::cout << "Log init failed: " << ex.what() << std::endl;
    }
}

Rotating files

#include "spdlog/sinks/rotating_file_sink.h"
void rotating_example()
{
    // Create a file rotating logger with 5mb size max and 3 rotated files
    auto max_size = 1048576 * 5;
    auto max_files = 3;
    auto logger = spdlog::rotating_logger_mt("some_logger_name", "logs/rotating.txt", max_size, max_files);
}

Daily files


#include "spdlog/sinks/daily_file_sink.h"
void daily_example()
{
    // Create a daily logger - a new file is created every day on 2:30am
    auto logger = spdlog::daily_logger_mt("daily_logger", "logs/daily.txt", 2, 30);
}


Backtrace support

// Debug messages can be stored in a ring buffer instead of being logged immediately.
// This is useful in order to display debug logs only when really needed (e.g. when error happens).
// When needed, call dump_backtrace() to see them.

spdlog::enable_backtrace(32); // Store the latest 32 messages in a buffer. Older messages will be dropped.
// or my_logger->enable_backtrace(32)..
for(int i = 0; i < 100; i++)
{
  spdlog::debug("Backtrace message {}", i); // not logged yet..
}
// e.g. if some error happened:
spdlog::dump_backtrace(); // log them now! show the last 32 messages

// or my_logger->dump_backtrace(32)..

Periodic flush

// periodically flush all *registered* loggers every 3 seconds:
// warning: only use if all your loggers are thread safe ("_mt" loggers)
spdlog::flush_every(std::chrono::seconds(3));


Stopwatch

// Stopwatch support for spdlog
#include "spdlog/stopwatch.h"
void stopwatch_example()
{
    spdlog::stopwatch sw;    
    spdlog::debug("Elapsed {}", sw);
    spdlog::debug("Elapsed {:.3}", sw);       
}


Log binary data in hex

// many types of std::container<char> types can be used.
// ranges are supported too.
// format flags:
// {:X} - print in uppercase.
// {:s} - don't separate each byte with space.
// {:p} - don't print the position on each line start.
// {:n} - don't split the output to lines.
// {:a} - show ASCII if :n is not set.

#include "spdlog/fmt/bin_to_hex.h"

void binary_example()
{
    auto console = spdlog::get("console");
    std::array<char, 80> buf;
    console->info("Binary example: {}", spdlog::to_hex(buf));
    console->info("Another binary example:{:n}", spdlog::to_hex(std::begin(buf), std::begin(buf) + 10));
    // more examples:
    // logger->info("uppercase: {:X}", spdlog::to_hex(buf));
    // logger->info("uppercase, no delimiters: {:Xs}", spdlog::to_hex(buf));
    // logger->info("uppercase, no delimiters, no position info: {:Xsp}", spdlog::to_hex(buf));
}


Logger with multi sinks - each with different format and log level


// create logger with 2 targets with different log levels and formats.
// the console will show only warnings or errors, while the file will log all.
void multi_sink_example()
{
    auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
    console_sink->set_level(spdlog::level::warn);
    console_sink->set_pattern("[multi_sink_example] [%^%l%$] %v");

    auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>("logs/multisink.txt", true);
    file_sink->set_level(spdlog::level::trace);

    spdlog::logger logger("multi_sink", {console_sink, file_sink});
    logger.set_level(spdlog::level::debug);
    logger.warn("this should appear in both console and file");
    logger.info("this message should not appear in the console, only in the file");
}

Asynchronous logging

#include "spdlog/async.h"
#include "spdlog/sinks/basic_file_sink.h"
void async_example()
{
    // default thread pool settings can be modified *before* creating the async logger:
    // spdlog::init_thread_pool(8192, 1); // queue with 8k items and 1 backing thread.
    auto async_file = spdlog::basic_logger_mt<spdlog::async_factory>("async_file_logger", "logs/async_log.txt");
    // alternatively:
    // auto async_file = spdlog::create_async<spdlog::sinks::basic_file_sink_mt>("async_file_logger", "logs/async_log.txt");   
}


Asynchronous logger with multi sinks

#include "spdlog/sinks/stdout_color_sinks.h"
#include "spdlog/sinks/rotating_file_sink.h"

void multi_sink_example2()
{
    spdlog::init_thread_pool(8192, 1);
    auto stdout_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt >();
    auto rotating_sink = std::make_shared<spdlog::sinks::rotating_file_sink_mt>("mylog.txt", 1024*1024*10, 3);
    std::vector<spdlog::sink_ptr> sinks {stdout_sink, rotating_sink};
    auto logger = std::make_shared<spdlog::async_logger>("loggername", sinks.begin(), sinks.end(), spdlog::thread_pool(), spdlog::async_overflow_policy::block);
    spdlog::register_logger(logger);
}

User defined types

// user defined types logging by implementing operator<<
#include "spdlog/fmt/ostr.h" // must be included
struct my_type
{
    int i;
    template<typename OStream>
    friend OStream &operator<<(OStream &os, const my_type &c)
    {
        return os << "[my_type i=" << c.i << "]";
    }
};

void user_defined_example()
{
    spdlog::get("console")->info("user defined type: {}", my_type{14});
}


User defined flags in the log pattern

// Log patterns can contain custom flags.
// the following example will add new flag '%*' - which will be bound to a <my_formatter_flag> instance.
#include "spdlog/pattern_formatter.h"
class my_formatter_flag : public spdlog::custom_flag_formatter
{
public:
    void format(const spdlog::details::log_msg &, const std::tm &, spdlog::memory_buf_t &dest) override
    {
        std::string some_txt = "custom-flag";
        dest.append(some_txt.data(), some_txt.data() + some_txt.size());
    }

    std::unique_ptr<custom_flag_formatter> clone() const override
    {
        return spdlog::details::make_unique<my_formatter_flag>();
    }
};

void custom_flags_example()
{    
    auto formatter = std::make_unique<spdlog::pattern_formatter>();
    formatter->add_flag<my_formatter_flag>('*').set_pattern("[%n] [%*] [%^%l%$] %v");
    spdlog::set_formatter(std::move(formatter));
}


Custom error handler

void err_handler_example()
{
    // can be set globally or per logger(logger->set_error_handler(..))
    spdlog::set_error_handler([](const std::string &msg) { spdlog::get("console")->error("*** LOGGER ERROR ***: {}", msg); });
    spdlog::get("console")->info("some invalid message to trigger an error {}{}{}{}", 3);
}


syslog

#include "spdlog/sinks/syslog_sink.h"
void syslog_example()
{
    std::string ident = "spdlog-example";
    auto syslog_logger = spdlog::syslog_logger_mt("syslog", ident, LOG_PID);
    syslog_logger->warn("This is warning that will end up in syslog.");
}

Android example

#include "spdlog/sinks/android_sink.h"
void android_example()
{
    std::string tag = "spdlog-android";
    auto android_logger = spdlog::android_logger_mt("android", tag);
    android_logger->critical("Use \"adb shell logcat\" to view this message.");
}

Load log levels from env variable or from argv

#include "spdlog/cfg/env.h"
int main (int argc, char *argv[])
{
    spdlog::cfg::load_env_levels();
    // or from command line:
    // ./example SPDLOG_LEVEL=info,mylogger=trace
    // #include "spdlog/cfg/argv.h" // for loading levels from argv
    // spdlog::cfg::load_argv_levels(argc, argv);
}

So then you can:

$ export SPDLOG_LEVEL=info,mylogger=trace
$ ./example

Benchmarks

Below are some benchmarks done in Ubuntu 64 bit, Intel i7-4770 CPU @ 3.40GHz

Synchronous mode

[info] **************************************************************
[info] Single thread, 1,000,000 iterations
[info] **************************************************************
[info] basic_st         Elapsed: 0.17 secs        5,777,626/sec
[info] rotating_st      Elapsed: 0.18 secs        5,475,894/sec
[info] daily_st         Elapsed: 0.20 secs        5,062,659/sec
[info] empty_logger     Elapsed: 0.07 secs       14,127,300/sec
[info] **************************************************************
[info] C-string (400 bytes). Single thread, 1,000,000 iterations
[info] **************************************************************
[info] basic_st         Elapsed: 0.41 secs        2,412,483/sec
[info] rotating_st      Elapsed: 0.72 secs        1,389,196/sec
[info] daily_st         Elapsed: 0.42 secs        2,393,298/sec
[info] null_st          Elapsed: 0.04 secs       27,446,957/sec
[info] **************************************************************
[info] 10 threads, competing over the same logger object, 1,000,000 iterations
[info] **************************************************************
[info] basic_mt         Elapsed: 0.60 secs        1,659,613/sec
[info] rotating_mt      Elapsed: 0.62 secs        1,612,493/sec
[info] daily_mt         Elapsed: 0.61 secs        1,638,305/sec
[info] null_mt          Elapsed: 0.16 secs        6,272,758/sec

Asynchronous mode

[info] -------------------------------------------------
[info] Messages     : 1,000,000
[info] Threads      : 10
[info] Queue        : 8,192 slots
[info] Queue memory : 8,192 x 272 = 2,176 KB 
[info] -------------------------------------------------
[info] 
[info] *********************************
[info] Queue Overflow Policy: block
[info] *********************************
[info] Elapsed: 1.70784 secs     585,535/sec
[info] Elapsed: 1.69805 secs     588,910/sec
[info] Elapsed: 1.7026 secs      587,337/sec
[info] 
[info] *********************************
[info] Queue Overflow Policy: overrun
[info] *********************************
[info] Elapsed: 0.372816 secs    2,682,285/sec
[info] Elapsed: 0.379758 secs    2,633,255/sec
[info] Elapsed: 0.373532 secs    2,677,147/sec

Documentation

Documentation can be found in the wiki pages.


Thanks to JetBrains for donating product licenses to help develop spdlog