From 24fe442d03f9ec47b63a0053b6916a59b4b12141 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 12 Jan 2024 17:33:23 +0200 Subject: [PATCH] Use relative includes and create spdlog_config.h --- .gitignore | 1 + CMakeLists.txt | 28 ++--- cmake/spdlog_config.h.in | 35 ++++++ include/spdlog/async.h | 6 +- include/spdlog/async_logger.h | 2 +- include/spdlog/cfg/argv.h | 2 +- include/spdlog/cfg/env.h | 2 +- include/spdlog/common.h | 5 +- include/spdlog/details/log_msg_buffer.h | 2 +- include/spdlog/details/mpmc_blocking_q.h | 2 +- include/spdlog/details/registry.h | 2 +- include/spdlog/details/synchronous_factory.h | 2 +- include/spdlog/details/tcp_client-windows.h | 2 +- include/spdlog/details/tcp_client.h | 2 +- include/spdlog/details/thread_pool.h | 6 +- include/spdlog/details/udp_client-windows.h | 4 +- include/spdlog/details/udp_client.h | 2 +- include/spdlog/fmt/fmt.h | 2 +- include/spdlog/formatter.h | 2 +- include/spdlog/logger.h | 6 +- include/spdlog/pattern_formatter.h | 8 +- include/spdlog/sinks/android_sink.h | 4 +- include/spdlog/sinks/ansicolor_sink.h | 2 +- include/spdlog/sinks/base_sink.h | 2 +- include/spdlog/sinks/basic_file_sink.h | 2 +- include/spdlog/sinks/callback_sink.h | 2 +- include/spdlog/sinks/daily_file_sink.h | 3 +- include/spdlog/sinks/dist_sink.h | 2 +- include/spdlog/sinks/dup_filter_sink.h | 2 +- include/spdlog/sinks/hourly_file_sink.h | 2 +- include/spdlog/sinks/kafka_sink.h | 2 +- include/spdlog/sinks/mongo_sink.h | 2 +- include/spdlog/sinks/msvc_sink.h | 2 +- include/spdlog/sinks/null_sink.h | 2 +- include/spdlog/sinks/ostream_sink.h | 2 +- include/spdlog/sinks/qt_sinks.h | 2 +- include/spdlog/sinks/ringbuffer_sink.h | 2 +- include/spdlog/sinks/rotating_file_sink.h | 2 +- include/spdlog/sinks/stdout_color_sinks.h | 4 +- include/spdlog/sinks/stdout_sinks.h | 4 +- include/spdlog/sinks/syslog_sink.h | 2 +- include/spdlog/sinks/systemd_sink.h | 2 +- include/spdlog/sinks/tcp_sink.h | 2 +- include/spdlog/sinks/udp_sink.h | 2 +- include/spdlog/sinks/win_eventlog_sink.h | 2 +- include/spdlog/sinks/wincolor_sink.h | 2 +- include/spdlog/tweakme.h | 117 ------------------- 47 files changed, 105 insertions(+), 192 deletions(-) create mode 100644 cmake/spdlog_config.h.in delete mode 100644 include/spdlog/tweakme.h diff --git a/.gitignore b/.gitignore index 1fa9942d..41cf92c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Auto generated files +include/spdlog/spdlog_config.h [Dd]ebug/ [Rr]elease/ build/* diff --git a/CMakeLists.txt b/CMakeLists.txt index b1f9e0bc..94244b33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,7 +176,6 @@ set(SPDLOG_HEADERS "include/spdlog/source_loc.h" "include/spdlog/spdlog.h" "include/spdlog/stopwatch.h" - "include/spdlog/tweakme.h" "include/spdlog/version.h" "include/spdlog/cfg/argv.h" "include/spdlog/cfg/env.h" @@ -250,6 +249,11 @@ set(SPDLOG_SRCS "src/sinks/stdout_sinks.cpp" "src/sinks/wincolor_sink.cpp") +# Generate spdlog_config.h based on the current configuration +set(OUT_CONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/spdlog/spdlog_config.h") +message(STATUS "Generating ${OUT_CONFIG_FILE}") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/spdlog_config.h.in" ${OUT_CONFIG_FILE} @ONLY) +list(APPEND SPDLOG_HEADERS ${OUT_CONFIG_FILE}) if(BUILD_SHARED_LIBS) if(WIN32) @@ -299,23 +303,6 @@ if(ANDROID) target_link_libraries(spdlog PUBLIC log) endif() -# --------------------------------------------------------------------------------------- -# Misc definitions according to tweak options -# --------------------------------------------------------------------------------------- -foreach( - SPDLOG_OPTION - SPDLOG_WCHAR_FILENAMES - SPDLOG_NO_EXCEPTIONS - SPDLOG_CLOCK_COARSE - SPDLOG_PREVENT_CHILD_FD - SPDLOG_NO_THREAD_ID - SPDLOG_NO_ATOMIC_LEVELS - SPDLOG_DISABLE_DEFAULT_LOGGER - SPDLOG_USE_STD_FORMAT) - if(${SPDLOG_OPTION}) - target_compile_definitions(spdlog PUBLIC ${SPDLOG_OPTION}) - endif() -endforeach() # --------------------------------------------------------------------------------------- # If exceptions are disabled, disable them in the bundled fmt as well @@ -407,4 +394,9 @@ if(SPDLOG_INSTALL) # Support creation of installable packages # --------------------------------------------------------------------------------------- include(cmake/spdlogCPack.cmake) + + # Install spdlog_config.h file + # Assume your tweakme.h.in is located in the same directory as CMakeLists.txt + set(TWEAKME_IN "${CMAKE_CURRENT_SOURCE_DIR}/tweakme.h.in") + set(TWEAKME_OUT "${CMAKE_CURRENT_BINARY_DIR}/include/spdlog/tweakme.h") endif() diff --git a/cmake/spdlog_config.h.in b/cmake/spdlog_config.h.in new file mode 100644 index 00000000..3c4185f8 --- /dev/null +++ b/cmake/spdlog_config.h.in @@ -0,0 +1,35 @@ +// Copyright(c) 2015-present, Gabi Melman & spdlog contributors. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) + + +// Auto generated file with compile time flags with which spdlog was compiled +// DO NOT EDIT MANUALLY + +#pragma once + +// Support wchar filenames (Windows only) +#cmakedefine SPDLOG_WCHAR_FILENAMES + +#cmakedefine SPDLOG_NO_EXCEPTIONS + +// Use CLOCK_REALTIME_COARSE on Linux +#cmakedefine SPDLOG_CLOCK_COARSE + +// Prevent child processes from inheriting log file descriptors +#cmakedefine SPDLOG_PREVENT_CHILD_FD + +// Prevent spdlog from querying the thread id on each log call +#cmakedefine SPDLOG_NO_THREAD_ID + +// Prevent spdlog from using std::atomic for log levels +#cmakedefine SPDLOG_NO_ATOMIC_LEVELS + +// Disable default logger creation +#cmakedefine SPDLOG_DISABLE_DEFAULT_LOGGER + +// Use std::format instead of fmtlib +#cmakedefine SPDLOG_USE_STD_FORMAT + +// Use external fmtlib instead of bundled +#cmakedefine SPDLOG_FMT_EXTERNAL + diff --git a/include/spdlog/async.h b/include/spdlog/async.h index b5814b53..885e6bcb 100644 --- a/include/spdlog/async.h +++ b/include/spdlog/async.h @@ -18,9 +18,9 @@ #include #include -#include "async_logger.h" -#include "details/registry.h" -#include "details/thread_pool.h" +#include "./async_logger.h" +#include "./details/registry.h" +#include "./details/thread_pool.h" namespace spdlog { diff --git a/include/spdlog/async_logger.h b/include/spdlog/async_logger.h index 476621d7..7ade9b43 100644 --- a/include/spdlog/async_logger.h +++ b/include/spdlog/async_logger.h @@ -14,7 +14,7 @@ // Upon destruction, logs all remaining messages in the queue before // destructing -#include "logger.h" +#include "./logger.h" namespace spdlog { diff --git a/include/spdlog/cfg/argv.h b/include/spdlog/cfg/argv.h index 899a1ff8..9ce5a4ce 100644 --- a/include/spdlog/cfg/argv.h +++ b/include/spdlog/cfg/argv.h @@ -3,7 +3,7 @@ #pragma once #include "../details/registry.h" -#include "helpers.h" +#include "./helpers.h" // // Init log levels using each argv entry that starts with "SPDLOG_LEVEL=" diff --git a/include/spdlog/cfg/env.h b/include/spdlog/cfg/env.h index c2fb74ba..918ce662 100644 --- a/include/spdlog/cfg/env.h +++ b/include/spdlog/cfg/env.h @@ -4,7 +4,7 @@ #pragma once #include "../details/os.h" #include "../details/registry.h" -#include "helpers.h" +#include "./helpers.h" // // Init levels and patterns from env variables SPDLOG_LEVEL diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 191e6ec0..205c124c 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -15,8 +15,9 @@ #include #include -#include "source_loc.h" -#include "tweakme.h" +#include "./spdlog_config.h" +#include "./source_loc.h" + #if __has_include() #include diff --git a/include/spdlog/details/log_msg_buffer.h b/include/spdlog/details/log_msg_buffer.h index fc7b2cbd..14d409a1 100644 --- a/include/spdlog/details/log_msg_buffer.h +++ b/include/spdlog/details/log_msg_buffer.h @@ -3,7 +3,7 @@ #pragma once -#include "log_msg.h" +#include "./log_msg.h" namespace spdlog { namespace details { diff --git a/include/spdlog/details/mpmc_blocking_q.h b/include/spdlog/details/mpmc_blocking_q.h index 6d3e298f..1eeb62d5 100644 --- a/include/spdlog/details/mpmc_blocking_q.h +++ b/include/spdlog/details/mpmc_blocking_q.h @@ -14,7 +14,7 @@ #include #include -#include "circular_q.h" +#include "./circular_q.h" namespace spdlog { namespace details { diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index ff0e572c..96d717e2 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -16,7 +16,7 @@ #include #include "../common.h" -#include "periodic_worker.h" +#include "./periodic_worker.h" namespace spdlog { class logger; diff --git a/include/spdlog/details/synchronous_factory.h b/include/spdlog/details/synchronous_factory.h index 4bd5a51c..6baff7d1 100644 --- a/include/spdlog/details/synchronous_factory.h +++ b/include/spdlog/details/synchronous_factory.h @@ -3,7 +3,7 @@ #pragma once -#include "registry.h" +#include "./registry.h" namespace spdlog { diff --git a/include/spdlog/details/tcp_client-windows.h b/include/spdlog/details/tcp_client-windows.h index 94614353..63ad0b23 100644 --- a/include/spdlog/details/tcp_client-windows.h +++ b/include/spdlog/details/tcp_client-windows.h @@ -14,7 +14,7 @@ #include #include "../common.h" -#include "os.h" +#include "./os.h" #pragma comment(lib, "Ws2_32.lib") #pragma comment(lib, "Mswsock.lib") diff --git a/include/spdlog/details/tcp_client.h b/include/spdlog/details/tcp_client.h index 283da418..c3eb1886 100644 --- a/include/spdlog/details/tcp_client.h +++ b/include/spdlog/details/tcp_client.h @@ -19,7 +19,7 @@ #include #include "../common.h" -#include "os.h" +#include "./os.h" namespace spdlog { namespace details { diff --git a/include/spdlog/details/thread_pool.h b/include/spdlog/details/thread_pool.h index 643532fd..10194ebc 100644 --- a/include/spdlog/details/thread_pool.h +++ b/include/spdlog/details/thread_pool.h @@ -10,9 +10,9 @@ #include #include "../async.h" -#include "log_msg_buffer.h" -#include "mpmc_blocking_q.h" -#include "os.h" +#include "./log_msg_buffer.h" +#include "./mpmc_blocking_q.h" +#include "./os.h" namespace spdlog { class async_logger; diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 446b3a56..5fb5e661 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -14,8 +14,8 @@ #include #include "../common.h" -#include "os.h" -#include "windows_include.h" +#include "./os.h" +#include "./windows_include.h" #if defined(_MSC_VER) #pragma comment(lib, "Ws2_32.lib") diff --git a/include/spdlog/details/udp_client.h b/include/spdlog/details/udp_client.h index 2e3067e9..b3abd413 100644 --- a/include/spdlog/details/udp_client.h +++ b/include/spdlog/details/udp_client.h @@ -7,7 +7,7 @@ // Will throw on construction if the socket creation failed. #include "../common.h" -#include "os.h" +#include "./os.h" #ifdef _WIN32 #error "include udp_client-windows.h instead" diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h index 0932872f..e631e6bb 100644 --- a/include/spdlog/fmt/fmt.h +++ b/include/spdlog/fmt/fmt.h @@ -9,7 +9,7 @@ // Include a bundled header-only copy of fmtlib or an external one. // By default, spdlog include its own copy. // -#include +#include "../spdlog_config.h" #if defined(SPDLOG_USE_STD_FORMAT) // use std::format #include diff --git a/include/spdlog/formatter.h b/include/spdlog/formatter.h index 4ebdf910..6db45660 100644 --- a/include/spdlog/formatter.h +++ b/include/spdlog/formatter.h @@ -3,7 +3,7 @@ #pragma once -#include "details/log_msg.h" +#include "./details/log_msg.h" #include "fmt/fmt.h" namespace spdlog { diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index f733507e..8dd74846 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -17,9 +17,9 @@ #include #include -#include "common.h" -#include "details/log_msg.h" -#include "sinks/sink.h" +#include "./common.h" +#include "./details/log_msg.h" +#include "./sinks/sink.h" #ifndef SPDLOG_NO_EXCEPTIONS #define SPDLOG_LOGGER_CATCH(location) \ diff --git a/include/spdlog/pattern_formatter.h b/include/spdlog/pattern_formatter.h index 53cbd732..7e833d3e 100644 --- a/include/spdlog/pattern_formatter.h +++ b/include/spdlog/pattern_formatter.h @@ -10,10 +10,10 @@ #include #include -#include "common.h" -#include "details/log_msg.h" -#include "details/os.h" -#include "formatter.h" +#include "./common.h" +#include "./details/log_msg.h" +#include "./details/os.h" +#include "./formatter.h" namespace spdlog { namespace details { diff --git a/include/spdlog/sinks/android_sink.h b/include/spdlog/sinks/android_sink.h index 6823a037..ccdab0d7 100644 --- a/include/spdlog/sinks/android_sink.h +++ b/include/spdlog/sinks/android_sink.h @@ -16,8 +16,8 @@ #include "../details/fmt_helper.h" #include "../details/null_mutex.h" #include "../details/synchronous_factory.h" - #include "base_sink.h" - #include "os.h" + #include "./base_sink.h" + #include "./os.h" #if !defined(SPDLOG_ANDROID_RETRIES) #define SPDLOG_ANDROID_RETRIES 2 diff --git a/include/spdlog/sinks/ansicolor_sink.h b/include/spdlog/sinks/ansicolor_sink.h index 65858168..c35b33ca 100644 --- a/include/spdlog/sinks/ansicolor_sink.h +++ b/include/spdlog/sinks/ansicolor_sink.h @@ -9,7 +9,7 @@ #include #include "../details/null_mutex.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/base_sink.h b/include/spdlog/sinks/base_sink.h index b9fa0b4a..cda8e365 100644 --- a/include/spdlog/sinks/base_sink.h +++ b/include/spdlog/sinks/base_sink.h @@ -11,7 +11,7 @@ #include "../common.h" #include "../details/log_msg.h" -#include "sink.h" +#include "./sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/basic_file_sink.h b/include/spdlog/sinks/basic_file_sink.h index d581afc7..00cfbfcf 100644 --- a/include/spdlog/sinks/basic_file_sink.h +++ b/include/spdlog/sinks/basic_file_sink.h @@ -9,7 +9,7 @@ #include "../details/file_helper.h" #include "../details/null_mutex.h" #include "../details/synchronous_factory.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/callback_sink.h b/include/spdlog/sinks/callback_sink.h index ad0f1dc6..d009821e 100644 --- a/include/spdlog/sinks/callback_sink.h +++ b/include/spdlog/sinks/callback_sink.h @@ -8,7 +8,7 @@ #include "../details/null_mutex.h" #include "../details/synchronous_factory.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { diff --git a/include/spdlog/sinks/daily_file_sink.h b/include/spdlog/sinks/daily_file_sink.h index cc4fec03..c612d03c 100644 --- a/include/spdlog/sinks/daily_file_sink.h +++ b/include/spdlog/sinks/daily_file_sink.h @@ -16,8 +16,9 @@ #include "../details/null_mutex.h" #include "../details/os.h" #include "../details/synchronous_factory.h" +#include "./base_sink.h" #include "fmt/chrono.h" -#include "base_sink.h" + namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/dist_sink.h b/include/spdlog/sinks/dist_sink.h index f4c33d4c..7decc0b2 100644 --- a/include/spdlog/sinks/dist_sink.h +++ b/include/spdlog/sinks/dist_sink.h @@ -11,7 +11,7 @@ #include "../details/log_msg.h" #include "../details/null_mutex.h" #include "../pattern_formatter.h" -#include "base_sink.h" +#include "./base_sink.h" // Distribution sink (mux). Stores a vector of sinks which get called when log // is called diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h index 55a4e9c0..ecf01085 100644 --- a/include/spdlog/sinks/dup_filter_sink.h +++ b/include/spdlog/sinks/dup_filter_sink.h @@ -10,7 +10,7 @@ #include "../details/log_msg.h" #include "../details/null_mutex.h" -#include "dist_sink.h" +#include "./dist_sink.h" // Duplicate message removal sink. // Skip the message if previous one is identical and less than "max_skip_duration" have passed diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h index 4f358872..1b1324ec 100644 --- a/include/spdlog/sinks/hourly_file_sink.h +++ b/include/spdlog/sinks/hourly_file_sink.h @@ -16,7 +16,7 @@ #include "../details/os.h" #include "../details/synchronous_factory.h" #include "../fmt/fmt.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/kafka_sink.h b/include/spdlog/sinks/kafka_sink.h index 03571ba3..c2c533a8 100644 --- a/include/spdlog/sinks/kafka_sink.h +++ b/include/spdlog/sinks/kafka_sink.h @@ -17,7 +17,7 @@ #include "../details/log_msg.h" #include "../details/null_mutex.h" #include "../details/synchronous_factory.h" -#include "base_sink.h" +#include "./base_sink.h" // kafka header #include diff --git a/include/spdlog/sinks/mongo_sink.h b/include/spdlog/sinks/mongo_sink.h index 51b7c48e..1dec0bda 100644 --- a/include/spdlog/sinks/mongo_sink.h +++ b/include/spdlog/sinks/mongo_sink.h @@ -20,7 +20,7 @@ #include "../common.h" #include "../details/log_msg.h" #include "../details/synchronous_factory.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/msvc_sink.h b/include/spdlog/sinks/msvc_sink.h index e941be3f..b1502400 100644 --- a/include/spdlog/sinks/msvc_sink.h +++ b/include/spdlog/sinks/msvc_sink.h @@ -7,7 +7,7 @@ #include #include "../details/null_mutex.h" -#include "base_sink.h" +#include "./base_sink.h" // Avoid including windows.h (https://stackoverflow.com/a/30741042) extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char *lpOutputString); diff --git a/include/spdlog/sinks/null_sink.h b/include/spdlog/sinks/null_sink.h index adbaa7b5..64e29d41 100644 --- a/include/spdlog/sinks/null_sink.h +++ b/include/spdlog/sinks/null_sink.h @@ -7,7 +7,7 @@ #include "../details/null_mutex.h" #include "../details/synchronous_factory.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/ostream_sink.h b/include/spdlog/sinks/ostream_sink.h index 9be8a896..afcba082 100644 --- a/include/spdlog/sinks/ostream_sink.h +++ b/include/spdlog/sinks/ostream_sink.h @@ -7,7 +7,7 @@ #include #include "../details/null_mutex.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/qt_sinks.h b/include/spdlog/sinks/qt_sinks.h index 56f4b965..b6b9ad52 100644 --- a/include/spdlog/sinks/qt_sinks.h +++ b/include/spdlog/sinks/qt_sinks.h @@ -18,7 +18,7 @@ #include "../common.h" #include "../details/log_msg.h" #include "../details/synchronous_factory.h" -#include "base_sink.h" +#include "./base_sink.h" // // qt_sink class diff --git a/include/spdlog/sinks/ringbuffer_sink.h b/include/spdlog/sinks/ringbuffer_sink.h index 6534cf77..36e7cd82 100644 --- a/include/spdlog/sinks/ringbuffer_sink.h +++ b/include/spdlog/sinks/ringbuffer_sink.h @@ -11,7 +11,7 @@ #include "../details/circular_q.h" #include "../details/log_msg_buffer.h" #include "../details/null_mutex.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/rotating_file_sink.h b/include/spdlog/sinks/rotating_file_sink.h index dc232c8d..b2cc278c 100644 --- a/include/spdlog/sinks/rotating_file_sink.h +++ b/include/spdlog/sinks/rotating_file_sink.h @@ -10,7 +10,7 @@ #include "../details/file_helper.h" #include "../details/null_mutex.h" #include "../details/synchronous_factory.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/stdout_color_sinks.h b/include/spdlog/sinks/stdout_color_sinks.h index 2217ac1c..ec0659e5 100644 --- a/include/spdlog/sinks/stdout_color_sinks.h +++ b/include/spdlog/sinks/stdout_color_sinks.h @@ -4,9 +4,9 @@ #pragma once #ifdef _WIN32 - #include "wincolor_sink.h" + #include "./wincolor_sink.h" #else - #include "ansicolor_sink.h" + #include "./ansicolor_sink.h" #endif #include "../async.h" diff --git a/include/spdlog/sinks/stdout_sinks.h b/include/spdlog/sinks/stdout_sinks.h index d5034a5d..6bb097ea 100644 --- a/include/spdlog/sinks/stdout_sinks.h +++ b/include/spdlog/sinks/stdout_sinks.h @@ -7,8 +7,8 @@ #include "../details/synchronous_factory.h" #include "../details/null_mutex.h" -#include "base_sink.h" -#include "sink.h" +#include "./base_sink.h" +#include "./sink.h" #ifdef _WIN32 #include "../details/windows_include.h" diff --git a/include/spdlog/sinks/syslog_sink.h b/include/spdlog/sinks/syslog_sink.h index 4b78dcd0..b1eae3d5 100644 --- a/include/spdlog/sinks/syslog_sink.h +++ b/include/spdlog/sinks/syslog_sink.h @@ -10,7 +10,7 @@ #include "../details/null_mutex.h" #include "../details/synchronous_factory.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/sinks/systemd_sink.h b/include/spdlog/sinks/systemd_sink.h index c79c4339..b3c4e267 100644 --- a/include/spdlog/sinks/systemd_sink.h +++ b/include/spdlog/sinks/systemd_sink.h @@ -8,7 +8,7 @@ #include "../details/null_mutex.h" #include "../details/os.h" #include "../details/synchronous_factory.h" -#include "base_sink.h" +#include "./base_sink.h" #ifndef SD_JOURNAL_SUPPRESS_LOCATION #define SD_JOURNAL_SUPPRESS_LOCATION #endif diff --git a/include/spdlog/sinks/tcp_sink.h b/include/spdlog/sinks/tcp_sink.h index 65e3e19f..d6c7b587 100644 --- a/include/spdlog/sinks/tcp_sink.h +++ b/include/spdlog/sinks/tcp_sink.h @@ -5,7 +5,7 @@ #include "../common.h" #include "../details/null_mutex.h" -#include "base_sink.h" +#include "./base_sink.h" #ifdef _WIN32 #include "../details/tcp_client-windows.h" #else diff --git a/include/spdlog/sinks/udp_sink.h b/include/spdlog/sinks/udp_sink.h index 7780acb1..9508cd14 100644 --- a/include/spdlog/sinks/udp_sink.h +++ b/include/spdlog/sinks/udp_sink.h @@ -5,7 +5,7 @@ #include "../common.h" #include "../details/null_mutex.h" -#include "base_sink.h" +#include "./base_sink.h" #ifdef _WIN32 #include "../details/udp_client-windows.h" #else diff --git a/include/spdlog/sinks/win_eventlog_sink.h b/include/spdlog/sinks/win_eventlog_sink.h index 281bd76d..a0d13ac9 100644 --- a/include/spdlog/sinks/win_eventlog_sink.h +++ b/include/spdlog/sinks/win_eventlog_sink.h @@ -34,7 +34,7 @@ Windows Registry Editor Version 5.00 #pragma once // clang-format off -#include "base_sink.h" +#include "./base_sink.h" #include "../details/null_mutex.h" #include "../details/windows_include.h" diff --git a/include/spdlog/sinks/wincolor_sink.h b/include/spdlog/sinks/wincolor_sink.h index 7a151007..1f6c0974 100644 --- a/include/spdlog/sinks/wincolor_sink.h +++ b/include/spdlog/sinks/wincolor_sink.h @@ -11,7 +11,7 @@ #include "../common.h" #include "../details/null_mutex.h" -#include "base_sink.h" +#include "./base_sink.h" namespace spdlog { namespace sinks { diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h deleted file mode 100644 index b4c8cdcf..00000000 --- a/include/spdlog/tweakme.h +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright(c) 2015-present, Gabi Melman & spdlog contributors. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) - -#pragma once - -/////////////////////////////////////////////////////////////////////////////// -// -// Edit this file to squeeze more performance, and to customize supported -// features -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Under Linux, the much faster CLOCK_REALTIME_COARSE clock can be used. -// This clock is less accurate - can be off by dozens of millis - depending on -// the kernel HZ. -// Uncomment to use it instead of the regular clock. -// -// #define SPDLOG_CLOCK_COARSE -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment if source location logging is needed./ -// #define SPDLOG_SOURCE_LOCATION -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment if thread id logging is not needed (i.e. no %t in the log pattern). -// This will prevent spdlog from querying the thread id on each log call. -// -// WARNING: If the log pattern contains thread id (i.e, %t) while this flag is -// on, zero will be logged as thread id. -// -// #define SPDLOG_NO_THREAD_ID -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment to avoid spdlog's usage of atomic log levels -// Use only if your code never modifies a logger's log levels concurrently by -// different threads. -// -// #define SPDLOG_NO_ATOMIC_LEVELS -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment to enable usage of wchar_t for file names on Windows. -// -// #define SPDLOG_WCHAR_FILENAMES -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment to override default eol ("\n" or "\r\n" under Linux/Windows) -// -// #define SPDLOG_EOL ";-)\n" -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment to override default folder separators ("/" or "\\/" under -// Linux/Windows). Each character in the string is treated as a different -// separator. -// -// #define SPDLOG_FOLDER_SEPS "\\" -/////////////////////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment to use C++20 std::format instead of fmt. -// -// #define SPDLOG_USE_STD_FORMAT -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment to prevent child processes from inheriting log file descriptors -// -// #define SPDLOG_PREVENT_CHILD_FD -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment to customize level names (e.g. "MY TRACE") -// -// #define SPDLOG_LEVEL_NAMES { "MY TRACE", "MY DEBUG", "MY INFO", "MY WARNING", "MY ERROR", "MY -// CRITICAL", "OFF" } -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment to customize short level names (e.g. "MT") -// These can be longer than one character. -// -// #define SPDLOG_SHORT_LEVEL_NAMES { "T", "D", "I", "W", "E", "C", "O" } -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment to disable default logger creation. -// This might save some (very) small initialization time if no default logger is needed. -// -// #define SPDLOG_DISABLE_DEFAULT_LOGGER -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment and set to compile time level with zero cost (default is INFO). -// Macros like SPDLOG_DEBUG(..), SPDLOG_INFO(..) will expand to empty statements if not enabled -// -// #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_INFO -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// Uncomment (and change if desired) macro to use for function names. -// This is compiler dependent. -// __PRETTY_FUNCTION__ might be nicer in clang/gcc, and __FUNCTION__ in msvc. -// Defaults to __FUNCTION__ (should work on all compilers) if not defined. -// -// #ifdef __PRETTY_FUNCTION__ -// # define SPDLOG_FUNCTION __PRETTY_FUNCTION__ -// #else -// # define SPDLOG_FUNCTION __FUNCTION__ -// #endif -///////////////////////////////////////////////////////////////////////////////