diff --git a/example/example.cpp b/example/example.cpp index 5e8c37f4..889d96bc 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -29,7 +29,7 @@ #include "spdlog/spdlog.h" -int main_(int, char* []) +int main(int, char* []) { namespace spd = spdlog; diff --git a/include/spdlog/async_logger.h b/include/spdlog/async_logger.h index ddc8e4b6..52931583 100644 --- a/include/spdlog/async_logger.h +++ b/include/spdlog/async_logger.h @@ -57,8 +57,8 @@ protected: void _stop() override; private: + log_clock::duration _shutdown_duration; std::unique_ptr _as; - log_clock::duration _shutdown_duration; }; } diff --git a/include/spdlog/details/async_logger_impl.h b/include/spdlog/details/async_logger_impl.h index c4f032ea..e84f897d 100644 --- a/include/spdlog/details/async_logger_impl.h +++ b/include/spdlog/details/async_logger_impl.h @@ -35,15 +35,15 @@ template -inline spdlog::async_logger::async_logger(const std::string& name, const It& begin, const It& end, size_t queue_size, const log_clock::duration& shutdown_duration) : - logger(name, begin, end), +inline spdlog::async_logger::async_logger(const std::string& logger_name, const It& begin, const It& end, size_t queue_size, const log_clock::duration& shutdown_duration) : + logger(logger_name, begin, end), _shutdown_duration(shutdown_duration), _as(std::unique_ptr(new sinks::async_sink(queue_size))) { _as->set_formatter(_formatter); for (auto &s : _sinks) _as->add_sink(s); -}; +} inline spdlog::async_logger::async_logger(const std::string& logger_name, sinks_init_list sinks, size_t queue_size, const log_clock::duration& shutdown_duration) : async_logger(logger_name, sinks.begin(), sinks.end(), queue_size, shutdown_duration) {} @@ -75,4 +75,4 @@ inline void spdlog::async_logger::_stop() { set_level(level::OFF); _as->shutdown(_shutdown_duration); -} \ No newline at end of file +}