mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 01:29:35 +08:00
Removed header only options
This commit is contained in:
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/async_logger.h>
|
||||
#endif
|
||||
#include <spdlog/async_logger.h>
|
||||
|
||||
#include <spdlog/sinks/sink.h>
|
||||
#include <spdlog/details/thread_pool.h>
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/cfg/helpers.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <spdlog/details/os.h>
|
||||
|
@@ -23,7 +23,3 @@ SPDLOG_API void load_levels(const std::string &txt);
|
||||
|
||||
} // namespace cfg
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "helpers-inl.h"
|
||||
#endif // SPDLOG_HEADER_ONLY
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/common.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
@@ -53,30 +53,6 @@
|
||||
# define SPDLOG_API
|
||||
#endif
|
||||
|
||||
//
|
||||
//
|
||||
//#ifdef SPDLOG_COMPILED_LIB
|
||||
//# undef SPDLOG_HEADER_ONLY
|
||||
//# if defined(SPDLOG_SHARED_LIB)
|
||||
//# if defined(_WIN32)
|
||||
//# ifdef spdlog_EXPORTS
|
||||
//# define SPDLOG_API __declspec(dllexport)
|
||||
//# else // !spdlog_EXPORTS
|
||||
//# define SPDLOG_API __declspec(dllimport)
|
||||
//# endif
|
||||
//# else // !defined(_WIN32)
|
||||
//# define SPDLOG_API __attribute__((visibility("default")))
|
||||
//# endif
|
||||
//# else // !defined(SPDLOG_SHARED_LIB)
|
||||
//# define SPDLOG_API
|
||||
//# endif
|
||||
//# define
|
||||
//#else // !defined(SPDLOG_COMPILED_LIB)
|
||||
//# define SPDLOG_API
|
||||
//# define SPDLOG_HEADER_ONLY
|
||||
//# define inline
|
||||
//#endif // #ifdef SPDLOG_COMPILED_LIB
|
||||
|
||||
#include <spdlog/fmt/fmt.h>
|
||||
|
||||
#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION >= 80000 // backward compatibility with fmt versions older than 8
|
||||
@@ -384,7 +360,3 @@ template<typename T, typename... Args>
|
||||
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "common-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/file_helper.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/details/file_helper.h>
|
||||
|
||||
#include <spdlog/details/os.h>
|
||||
#include <spdlog/common.h>
|
||||
|
@@ -56,7 +56,3 @@ private:
|
||||
};
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "file_helper-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/log_msg.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/details/os.h>
|
||||
|
||||
|
@@ -32,6 +32,3 @@ struct SPDLOG_API log_msg
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "log_msg-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/log_msg_buffer.h>
|
||||
#endif
|
||||
|
||||
namespace spdlog {
|
||||
namespace details {
|
||||
|
@@ -28,6 +28,3 @@ public:
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "log_msg_buffer-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/os.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
|
||||
|
@@ -117,6 +117,3 @@ SPDLOG_API bool fsync(FILE *fp);
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "os-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/periodic_worker.h>
|
||||
#endif
|
||||
|
||||
namespace spdlog {
|
||||
namespace details {
|
||||
|
@@ -54,7 +54,3 @@ private:
|
||||
};
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "periodic_worker-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/registry.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/details/periodic_worker.h>
|
||||
|
@@ -112,7 +112,3 @@ private:
|
||||
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "registry-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/thread_pool.h>
|
||||
#endif
|
||||
#include <spdlog/details/thread_pool.h>
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <cassert>
|
||||
|
@@ -118,7 +118,3 @@ private:
|
||||
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "thread_pool-inl.h"
|
||||
#endif
|
||||
|
@@ -10,11 +10,6 @@
|
||||
|
||||
#if !defined(SPDLOG_USE_STD_FORMAT)
|
||||
# if !defined(SPDLOG_FMT_EXTERNAL)
|
||||
# ifdef SPDLOG_HEADER_ONLY
|
||||
# ifndef FMT_HEADER_ONLY
|
||||
# define FMT_HEADER_ONLY
|
||||
# endif
|
||||
# endif
|
||||
# include <spdlog/fmt/bundled/chrono.h>
|
||||
# else
|
||||
# include <fmt/chrono.h>
|
||||
|
@@ -10,11 +10,6 @@
|
||||
|
||||
#if !defined(SPDLOG_USE_STD_FORMAT)
|
||||
# if !defined(SPDLOG_FMT_EXTERNAL)
|
||||
# ifdef SPDLOG_HEADER_ONLY
|
||||
# ifndef FMT_HEADER_ONLY
|
||||
# define FMT_HEADER_ONLY
|
||||
# endif
|
||||
# endif
|
||||
# include <spdlog/fmt/bundled/compile.h>
|
||||
# else
|
||||
# include <fmt/compile.h>
|
||||
|
@@ -10,11 +10,6 @@
|
||||
|
||||
#if !defined(SPDLOG_USE_STD_FORMAT)
|
||||
# if !defined(SPDLOG_FMT_EXTERNAL)
|
||||
# ifdef SPDLOG_HEADER_ONLY
|
||||
# ifndef FMT_HEADER_ONLY
|
||||
# define FMT_HEADER_ONLY
|
||||
# endif
|
||||
# endif
|
||||
# include <spdlog/fmt/bundled/ostream.h>
|
||||
# else
|
||||
# include <fmt/ostream.h>
|
||||
|
@@ -10,11 +10,6 @@
|
||||
|
||||
#if !defined(SPDLOG_USE_STD_FORMAT)
|
||||
# if !defined(SPDLOG_FMT_EXTERNAL)
|
||||
# ifdef SPDLOG_HEADER_ONLY
|
||||
# ifndef FMT_HEADER_ONLY
|
||||
# define FMT_HEADER_ONLY
|
||||
# endif
|
||||
# endif
|
||||
# include <spdlog/fmt/bundled/ranges.h>
|
||||
# else
|
||||
# include <fmt/ranges.h>
|
||||
|
@@ -11,11 +11,6 @@
|
||||
|
||||
#if !defined(SPDLOG_USE_STD_FORMAT)
|
||||
# if !defined(SPDLOG_FMT_EXTERNAL)
|
||||
# ifdef SPDLOG_HEADER_ONLY
|
||||
# ifndef FMT_HEADER_ONLY
|
||||
# define FMT_HEADER_ONLY
|
||||
# endif
|
||||
# endif
|
||||
# include <spdlog/fmt/bundled/std.h>
|
||||
# else
|
||||
# include <fmt/std.h>
|
||||
|
@@ -10,11 +10,6 @@
|
||||
|
||||
#if !defined(SPDLOG_USE_STD_FORMAT)
|
||||
# if !defined(SPDLOG_FMT_EXTERNAL)
|
||||
# ifdef SPDLOG_HEADER_ONLY
|
||||
# ifndef FMT_HEADER_ONLY
|
||||
# define FMT_HEADER_ONLY
|
||||
# endif
|
||||
# endif
|
||||
# include <spdlog/fmt/bundled/xchar.h>
|
||||
# else
|
||||
# include <fmt/xchar.h>
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/logger.h>
|
||||
#endif
|
||||
#include <spdlog/logger.h>
|
||||
|
||||
#include <spdlog/sinks/sink.h>
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
|
@@ -363,7 +363,3 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "logger-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/pattern_formatter.h>
|
||||
#endif
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
|
||||
#include <spdlog/details/fmt_helper.h>
|
||||
#include <spdlog/details/log_msg.h>
|
||||
|
@@ -123,6 +123,3 @@ private:
|
||||
};
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "pattern_formatter-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/ansicolor_sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
#include <spdlog/details/os.h>
|
||||
|
@@ -112,7 +112,3 @@ using ansicolor_stderr_sink_st = ansicolor_stderr_sink<details::console_nullmute
|
||||
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "ansicolor_sink-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/base_sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
|
@@ -47,6 +47,3 @@ protected:
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "base_sink-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/basic_file_sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/details/os.h>
|
||||
|
@@ -55,6 +55,3 @@ inline std::shared_ptr<logger> basic_logger_st(
|
||||
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "basic_file_sink-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/rotating_file_sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
|
||||
|
@@ -75,7 +75,3 @@ inline std::shared_ptr<logger> rotating_logger_st(const std::string &logger_name
|
||||
logger_name, filename, max_file_size, max_files, rotate_on_open, event_handlers);
|
||||
}
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "rotating_file_sink-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
|
||||
|
@@ -30,6 +30,3 @@ protected:
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "sink-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/logger.h>
|
||||
#include <spdlog/common.h>
|
||||
|
@@ -39,7 +39,3 @@ template<typename Factory = spdlog::synchronous_factory>
|
||||
std::shared_ptr<logger> stderr_color_st(const std::string &logger_name, color_mode mode = color_mode::automatic);
|
||||
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "stdout_color_sinks-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/stdout_sinks.h>
|
||||
#endif
|
||||
#include <spdlog/sinks/stdout_sinks.h>
|
||||
|
||||
#include <spdlog/details/console_globals.h>
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
|
@@ -82,6 +82,3 @@ std::shared_ptr<logger> stderr_logger_st(const std::string &logger_name);
|
||||
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "stdout_sinks-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/wincolor_sink.h>
|
||||
#endif
|
||||
#include <spdlog/sinks/wincolor_sink.h>
|
||||
|
||||
#include <spdlog/details/windows_include.h>
|
||||
#include <wincon.h>
|
||||
|
@@ -79,7 +79,3 @@ using wincolor_stderr_sink_mt = wincolor_stderr_sink<details::console_mutex>;
|
||||
using wincolor_stderr_sink_st = wincolor_stderr_sink<details::console_nullmutex>;
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "wincolor_sink-inl.h"
|
||||
#endif
|
||||
|
@@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/spdlog.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
|
@@ -361,8 +361,4 @@ inline void critical(string_view_t msg)
|
||||
# define SPDLOG_CRITICAL(...) (void)0
|
||||
#endif
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "spdlog-inl.h"
|
||||
#endif
|
||||
|
||||
#endif // SPDLOG_H
|
||||
|
Reference in New Issue
Block a user