From 156b856a809c7f8c80b1129a09730c48720dc1d7 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 5 Apr 2019 16:57:49 +0300 Subject: [PATCH] static lib wip --- example/example.cpp | 5 +---- include/spdlog/details/log_msg.h | 1 - include/spdlog/details/os.h | 14 +------------- include/spdlog/details/pattern_formatter.h | 4 ++++ 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/example/example.cpp b/example/example.cpp index e7d9559d..a97c3507 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -9,15 +9,12 @@ #include "spdlog/logger.h" - - spdlog::logger *get_logger(); int main(int, char *[]) { auto *l = get_logger(); - l->info("HELLO {}", "World"); - l->warn("SOME WARNINNG"); + l->info("HELLO {}", "GA"); l->error("Some {}", "error"); diff --git a/include/spdlog/details/log_msg.h b/include/spdlog/details/log_msg.h index 1507eac1..5d6f7ad1 100644 --- a/include/spdlog/details/log_msg.h +++ b/include/spdlog/details/log_msg.h @@ -12,7 +12,6 @@ namespace spdlog { namespace details { struct log_msg { - log_msg(source_loc loc, const std::string *loggers_name, level::level_enum lvl, string_view_t view); log_msg(const std::string *loggers_name, level::level_enum lvl, string_view_t view); diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index 7b1e5219..d923b30f 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -4,19 +4,7 @@ // #pragma once -#include "../common.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "spdlog/common.h" namespace spdlog { namespace details { diff --git a/include/spdlog/details/pattern_formatter.h b/include/spdlog/details/pattern_formatter.h index c9532293..3c38e762 100644 --- a/include/spdlog/details/pattern_formatter.h +++ b/include/spdlog/details/pattern_formatter.h @@ -1333,3 +1333,7 @@ private: } }; } // namespace spdlog + +#ifdef SPDLOG_HEADER_ONLY +#include "../src/os.cpp" +#endif