From f8d509d0101bd7d7d11fdc5d01cef8bd0b10517d Mon Sep 17 00:00:00 2001 From: Tennn Date: Sun, 21 May 2017 17:44:44 +0800 Subject: [PATCH] Fixed issues 449 Please check it --- include/spdlog/async_logger.h | 6 +++--- include/spdlog/common.h | 4 ++-- include/spdlog/details/async_log_helper.h | 12 ++++++------ include/spdlog/details/async_logger_impl.h | 4 ++-- include/spdlog/details/file_helper.h | 4 ++-- include/spdlog/details/log_msg.h | 4 ++-- include/spdlog/details/logger_impl.h | 4 ++-- include/spdlog/details/mpmc_bounded_q.h | 2 +- include/spdlog/details/os.h | 2 +- include/spdlog/details/pattern_formatter_impl.h | 8 ++++---- include/spdlog/details/registry.h | 8 ++++---- include/spdlog/details/spdlog_impl.h | 16 ++++++++-------- include/spdlog/fmt/fmt.h | 2 +- include/spdlog/fmt/ostr.h | 4 ++-- include/spdlog/formatter.h | 4 ++-- include/spdlog/logger.h | 6 +++--- include/spdlog/sinks/base_sink.h | 8 ++++---- include/spdlog/sinks/file_sinks.h | 8 ++++---- include/spdlog/sinks/sink.h | 2 +- include/spdlog/sinks/stdout_sinks.h | 4 ++-- include/spdlog/sinks/wincolor_sink.h | 6 +++--- include/spdlog/spdlog.h | 8 ++++---- 22 files changed, 63 insertions(+), 63 deletions(-) diff --git a/include/spdlog/async_logger.h b/include/spdlog/async_logger.h index a86d2190..8b492657 100644 --- a/include/spdlog/async_logger.h +++ b/include/spdlog/async_logger.h @@ -15,8 +15,8 @@ // 3. will throw spdlog_ex upon log exceptions // Upon destruction, logs all remaining messages in the queue before destructing.. -#include -#include +#include "spdlog/common.h" +#include "spdlog/logger.h" #include #include @@ -79,4 +79,4 @@ private: } -#include +#include "spdlog/details/async_logger_impl.h" diff --git a/include/spdlog/common.h b/include/spdlog/common.h index e9fa372e..14d5d149 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -18,7 +18,7 @@ #include #endif -#include +#include "spdlog/details/null_mutex.h" //visual studio upto 2013 does not support noexcept nor constexpr #if defined(_MSC_VER) && (_MSC_VER < 1900) @@ -43,7 +43,7 @@ #endif -#include +#include "spdlog/fmt/fmt.h" namespace spdlog { diff --git a/include/spdlog/details/async_log_helper.h b/include/spdlog/details/async_log_helper.h index 8aa42882..6145dfa6 100644 --- a/include/spdlog/details/async_log_helper.h +++ b/include/spdlog/details/async_log_helper.h @@ -12,12 +12,12 @@ #pragma once -#include -#include -#include -#include -#include -#include +#include "spdlog/common.h" +#include "spdlog/sinks/sink.h" +#include "spdlog/details/mpmc_bounded_q.h" +#include "spdlog/details/log_msg.h" +#include "spdlog/details/os.h" +#include "spdlog/formatter.h" #include #include diff --git a/include/spdlog/details/async_logger_impl.h b/include/spdlog/details/async_logger_impl.h index 30e08477..0b815f01 100644 --- a/include/spdlog/details/async_logger_impl.h +++ b/include/spdlog/details/async_logger_impl.h @@ -8,8 +8,8 @@ // Async Logger implementation // Use an async_sink (queue per logger) to perform the logging in a worker thread -#include -#include +#include "spdlog/details/async_log_helper.h" +#include "spdlog/async_logger.h" #include #include diff --git a/include/spdlog/details/file_helper.h b/include/spdlog/details/file_helper.h index 84ec722d..d0d730e2 100644 --- a/include/spdlog/details/file_helper.h +++ b/include/spdlog/details/file_helper.h @@ -9,8 +9,8 @@ // When failing to open a file, retry several times(5) with small delay between the tries(10 ms) // Throw spdlog_ex exception on errors -#include -#include +#include "spdlog/details/os.h" +#include "spdlog/details/log_msg.h" #include #include diff --git a/include/spdlog/details/log_msg.h b/include/spdlog/details/log_msg.h index 44ab5790..0d7ce4ba 100644 --- a/include/spdlog/details/log_msg.h +++ b/include/spdlog/details/log_msg.h @@ -5,8 +5,8 @@ #pragma once -#include -#include +#include "spdlog/common.h" +#include "spdlog/details/os.h" #include diff --git a/include/spdlog/details/logger_impl.h b/include/spdlog/details/logger_impl.h index 722d8fc9..a196a957 100644 --- a/include/spdlog/details/logger_impl.h +++ b/include/spdlog/details/logger_impl.h @@ -5,8 +5,8 @@ #pragma once -#include -#include +#include "spdlog/logger.h" +#include "spdlog/sinks/stdout_sinks.h" #include #include diff --git a/include/spdlog/details/mpmc_bounded_q.h b/include/spdlog/details/mpmc_bounded_q.h index 3a46e8eb..afd4c881 100644 --- a/include/spdlog/details/mpmc_bounded_q.h +++ b/include/spdlog/details/mpmc_bounded_q.h @@ -43,7 +43,7 @@ Distributed under the MIT License (http://opensource.org/licenses/MIT) #pragma once -#include +#include "spdlog/common.h" #include #include diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index 15b804a3..76aacf6d 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -4,7 +4,7 @@ // #pragma once -#include +#include "spdlog/common.h" #include #include diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h index 92e90714..8c096150 100644 --- a/include/spdlog/details/pattern_formatter_impl.h +++ b/include/spdlog/details/pattern_formatter_impl.h @@ -5,10 +5,10 @@ #pragma once -#include -#include -#include -#include +#include "spdlog/formatter.h" +#include "spdlog/details/log_msg.h" +#include "spdlog/details/os.h" +#include "spdlog/fmt/fmt.h" #include #include diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index ee14adfd..edba44bf 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -10,10 +10,10 @@ // If user requests a non existing logger, nullptr will be returned // This class is thread safe -#include -#include -#include -#include +#include "spdlog/details/null_mutex.h" +#include "spdlog/logger.h" +#include "spdlog/async_logger.h" +#include "spdlog/common.h" #include #include diff --git a/include/spdlog/details/spdlog_impl.h b/include/spdlog/details/spdlog_impl.h index a381df43..6999eed0 100644 --- a/include/spdlog/details/spdlog_impl.h +++ b/include/spdlog/details/spdlog_impl.h @@ -8,23 +8,23 @@ // // Global registry functions // -#include -#include -#include -#include +#include "spdlog/spdlog.h" +#include "spdlog/details/registry.h" +#include "spdlog/sinks/file_sinks.h" +#include "spdlog/sinks/stdout_sinks.h" #ifdef SPDLOG_ENABLE_SYSLOG -#include +#include "spdlog/sinks/syslog_sink.h" #endif #ifdef _WIN32 -#include +#include "spdlog/sinks/wincolor_sink.h" #else -#include +#include "spdlog/sinks/ansicolor_sink.h" #endif #ifdef __ANDROID__ -#include +#include "spdlog/sinks/android_sink.h" #endif #include diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h index dd035fd2..a4ee4673 100644 --- a/include/spdlog/fmt/fmt.h +++ b/include/spdlog/fmt/fmt.h @@ -18,7 +18,7 @@ #ifndef FMT_USE_WINDOWS_H #define FMT_USE_WINDOWS_H 0 #endif -#include +#include "spdlog/fmt/bundled/format.h" #else //external fmtlib diff --git a/include/spdlog/fmt/ostr.h b/include/spdlog/fmt/ostr.h index 7a651865..49b5e98c 100644 --- a/include/spdlog/fmt/ostr.h +++ b/include/spdlog/fmt/ostr.h @@ -8,8 +8,8 @@ // include external or bundled copy of fmtlib's ostream support // #if !defined(SPDLOG_FMT_EXTERNAL) -#include -#include +#include "spdlog/fmt/fmt.h" +#include "spdlog/fmt/bundled/ostream.h" #else #include #endif diff --git a/include/spdlog/formatter.h b/include/spdlog/formatter.h index 639cc7d2..337ca596 100644 --- a/include/spdlog/formatter.h +++ b/include/spdlog/formatter.h @@ -5,7 +5,7 @@ #pragma once -#include +#include "spdlog/details/log_msg.h" #include #include @@ -41,5 +41,5 @@ private: }; } -#include +#include "spdlog/details/pattern_formatter_impl.h" diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 07ed53f8..da2d8e41 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -12,8 +12,8 @@ // 2. Format the message using the formatter function // 3. Pass the formatted message to its sinks to performa the actual logging -#include -#include +#include "spdlog/sinks/base_sink.h" +#include "spdlog/common.h" #include #include @@ -102,4 +102,4 @@ protected: }; } -#include +#include "spdlog/details/logger_impl.h" diff --git a/include/spdlog/sinks/base_sink.h b/include/spdlog/sinks/base_sink.h index 978ade14..688b0118 100644 --- a/include/spdlog/sinks/base_sink.h +++ b/include/spdlog/sinks/base_sink.h @@ -10,10 +10,10 @@ // all locking is taken care of here so no locking needed by the implementers.. // -#include -#include -#include -#include +#include "spdlog/sinks/sink.h" +#include "spdlog/formatter.h" +#include "spdlog/common.h" +#include "spdlog/details/log_msg.h" #include diff --git a/include/spdlog/sinks/file_sinks.h b/include/spdlog/sinks/file_sinks.h index 5726117a..673548c5 100644 --- a/include/spdlog/sinks/file_sinks.h +++ b/include/spdlog/sinks/file_sinks.h @@ -5,10 +5,10 @@ #pragma once -#include -#include -#include -#include +#include "spdlog/sinks/base_sink.h" +#include "spdlog/details/null_mutex.h" +#include "spdlog/details/file_helper.h" +#include "spdlog/fmt/fmt.h" #include #include diff --git a/include/spdlog/sinks/sink.h b/include/spdlog/sinks/sink.h index b48dd8b9..0974f337 100644 --- a/include/spdlog/sinks/sink.h +++ b/include/spdlog/sinks/sink.h @@ -6,7 +6,7 @@ #pragma once -#include +#include "spdlog/details/log_msg.h" namespace spdlog { diff --git a/include/spdlog/sinks/stdout_sinks.h b/include/spdlog/sinks/stdout_sinks.h index a52e112f..dcdcc7c1 100644 --- a/include/spdlog/sinks/stdout_sinks.h +++ b/include/spdlog/sinks/stdout_sinks.h @@ -5,8 +5,8 @@ #pragma once -#include -#include +#include "spdlog/details/null_mutex.h" +#include "spdlog/sinks/base_sink.h" #include #include diff --git a/include/spdlog/sinks/wincolor_sink.h b/include/spdlog/sinks/wincolor_sink.h index 379b7ef0..e3cb5a17 100644 --- a/include/spdlog/sinks/wincolor_sink.h +++ b/include/spdlog/sinks/wincolor_sink.h @@ -5,9 +5,9 @@ #pragma once -#include -#include -#include +#include "spdlog/sinks/base_sink.h" +#include "spdlog/details/null_mutex.h" +#include "spdlog/common.h" #include #include diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index f6edd647..aeca50ed 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -9,9 +9,9 @@ #define SPDLOG_VERSION "0.13.0" -#include -#include -#include +#include "spdlog/tweakme.h" +#include "spdlog/common.h" +#include "spdlog/logger.h" #include #include @@ -175,4 +175,4 @@ void drop_all(); } -#include +#include "spdlog/details/spdlog_impl.h"