mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 10:29:02 +08:00
Moved cpp files to inl.h
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/async_logger.h"
|
||||
#endif
|
||||
|
||||
// async logger implementation
|
||||
// uses a thread pool to perform the actual logging
|
||||
|
@@ -66,5 +66,5 @@ private:
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/async_logger.cpp"
|
||||
#include "async_logger-inl.h"
|
||||
#endif
|
||||
|
@@ -3,10 +3,6 @@
|
||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
//
|
||||
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/details/file_helper.h"
|
||||
|
||||
#endif
|
||||
#include "spdlog/details/os.h"
|
||||
|
||||
#include <cerrno>
|
@@ -58,5 +58,5 @@ private:
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/file_helper.cpp"
|
||||
#include "file_helper-inl.h"
|
||||
#endif
|
||||
|
@@ -1,10 +1,6 @@
|
||||
#include "spdlog/details/os.h"
|
||||
#include "spdlog/sinks/sink.h"
|
||||
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/details/log_msg.h"
|
||||
#endif
|
||||
|
||||
SPDLOG_INLINE spdlog::details::log_msg::log_msg(
|
||||
spdlog::source_loc loc, const std::string *loggers_name, spdlog::level::level_enum lvl, spdlog::string_view_t view)
|
||||
: logger_name(loggers_name)
|
@@ -34,5 +34,5 @@ struct log_msg
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/log_msg.cpp"
|
||||
#include "log_msg-inl.h"
|
||||
#endif
|
||||
|
@@ -2,9 +2,6 @@
|
||||
// Copyright(c) 2015 Gabi Melman.
|
||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
//
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/details/os.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
@@ -90,5 +90,5 @@ void wbuf_to_utf8buf(const fmt::wmemory_buffer &wbuf, fmt::memory_buffer &target
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/os.cpp"
|
||||
#include "os-inl.h"
|
||||
#endif
|
||||
|
@@ -3,10 +3,6 @@
|
||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
//
|
||||
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/details/pattern_formatter.h"
|
||||
#endif
|
||||
|
||||
#include "spdlog/details/fmt_helper.h"
|
||||
#include "spdlog/details/log_msg.h"
|
||||
#include "spdlog/details/os.h"
|
@@ -98,5 +98,5 @@ private:
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/pattern_formatter.cpp"
|
||||
#include "pattern_formatter-inl.h"
|
||||
#endif
|
||||
|
@@ -2,10 +2,6 @@
|
||||
// Created by gabi on 5/8/19.
|
||||
//
|
||||
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/details/periodic_worker.h"
|
||||
#endif
|
||||
|
||||
#include "spdlog/common.h"
|
||||
|
||||
SPDLOG_INLINE spdlog::details::periodic_worker::periodic_worker(const std::function<void()> &callback_fun, std::chrono::seconds interval)
|
@@ -39,5 +39,5 @@ private:
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/periodic_worker.cpp"
|
||||
#include "periodic_worker-inl.h"
|
||||
#endif
|
||||
|
@@ -2,9 +2,6 @@
|
||||
// Copyright(c) 2015 Gabi Melman.
|
||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
//
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/details/registry.h"
|
||||
#endif
|
||||
|
||||
#include "spdlog/common.h"
|
||||
#include "spdlog/details/periodic_worker.h"
|
@@ -102,5 +102,5 @@ private:
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/registry.cpp"
|
||||
#include "registry-inl.h"
|
||||
#endif
|
||||
|
@@ -1,10 +1,3 @@
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/async_logger.h"
|
||||
#include "spdlog/details/thread_pool.h"
|
||||
|
||||
template class spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>;
|
||||
|
||||
#endif
|
||||
|
||||
#include "spdlog/common.h"
|
||||
|
@@ -152,5 +152,5 @@ private:
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/thread_pool.cpp"
|
||||
#include "thread_pool-inl.h"
|
||||
#endif
|
@@ -1,63 +0,0 @@
|
||||
// Formatting library for C++
|
||||
//
|
||||
// Copyright (c) 2012 - 2016, Victor Zverovich
|
||||
// All rights reserved.
|
||||
//
|
||||
// For the license information refer to format.h.
|
||||
|
||||
#if !defined(SPDLOG_FMT_EXTERNAL)
|
||||
#include "spdlog/fmt/bundled/format-inl.h"
|
||||
#else
|
||||
#include "fmt/format-inl.h"
|
||||
#endif
|
||||
|
||||
FMT_BEGIN_NAMESPACE
|
||||
template struct internal::basic_data<void>;
|
||||
template FMT_API internal::locale_ref::locale_ref(const std::locale &loc);
|
||||
template FMT_API std::locale internal::locale_ref::get<std::locale>() const;
|
||||
|
||||
// Explicit instantiations for char.
|
||||
|
||||
template FMT_API char internal::thousands_sep_impl(locale_ref);
|
||||
|
||||
template FMT_API void internal::basic_buffer<char>::append(const char *, const char *);
|
||||
|
||||
template FMT_API void internal::arg_map<format_context>::init(
|
||||
const basic_format_args<format_context> &args);
|
||||
|
||||
template FMT_API int internal::char_traits<char>::format_float(
|
||||
char *, std::size_t, const char *, int, double);
|
||||
|
||||
template FMT_API int internal::char_traits<char>::format_float(
|
||||
char *, std::size_t, const char *, int, long double);
|
||||
|
||||
template FMT_API std::string internal::vformat<char>(
|
||||
string_view, basic_format_args<format_context>);
|
||||
|
||||
template FMT_API format_context::iterator internal::vformat_to(
|
||||
internal::buffer &, string_view, basic_format_args<format_context>);
|
||||
|
||||
template FMT_API void internal::sprintf_format(
|
||||
double, internal::buffer &, core_format_specs);
|
||||
template FMT_API void internal::sprintf_format(
|
||||
long double, internal::buffer &, core_format_specs);
|
||||
|
||||
// Explicit instantiations for wchar_t.
|
||||
|
||||
template FMT_API wchar_t internal::thousands_sep_impl(locale_ref);
|
||||
|
||||
template FMT_API void internal::basic_buffer<wchar_t>::append(
|
||||
const wchar_t *, const wchar_t *);
|
||||
|
||||
template FMT_API void internal::arg_map<wformat_context>::init(
|
||||
const basic_format_args<wformat_context> &);
|
||||
|
||||
template FMT_API int internal::char_traits<wchar_t>::format_float(
|
||||
wchar_t *, std::size_t, const wchar_t *, int, double);
|
||||
|
||||
template FMT_API int internal::char_traits<wchar_t>::format_float(
|
||||
wchar_t *, std::size_t, const wchar_t *, int, long double);
|
||||
|
||||
template FMT_API std::wstring internal::vformat<wchar_t>(
|
||||
wstring_view, basic_format_args<wformat_context>);
|
||||
FMT_END_NAMESPACE
|
@@ -1,7 +1,3 @@
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/logger.h"
|
||||
#endif
|
||||
|
||||
#include "spdlog/sinks/sink.h"
|
||||
#include "spdlog/details/pattern_formatter.h"
|
||||
|
@@ -341,5 +341,5 @@ protected:
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/logger.cpp"
|
||||
#include "logger-inl.h
|
||||
#endif
|
||||
|
@@ -1,7 +1,3 @@
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/sinks/ansicolor_sink.h"
|
||||
#endif
|
||||
|
||||
#include "spdlog/details/os.h"
|
||||
|
||||
template<typename TargetStream, typename ConsoleMutex>
|
||||
@@ -95,11 +91,3 @@ SPDLOG_INLINE void spdlog::sinks::ansicolor_sink<TargetStream, ConsoleMutex>::pr
|
||||
{
|
||||
fwrite(formatted.data() + start, sizeof(char), end - start, target_file_);
|
||||
}
|
||||
|
||||
// template instantiate stdout_mt, stdout_st
|
||||
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stdout, spdlog::details::console_mutex>;
|
||||
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stdout, spdlog::details::console_nullmutex>;
|
||||
|
||||
// template instantiate stderr_mt, stderr_st
|
||||
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stderr, spdlog::details::console_mutex>;
|
||||
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stderr, spdlog::details::console_nullmutex>;
|
@@ -92,5 +92,5 @@ using ansicolor_stderr_sink_st = ansicolor_sink<details::console_stderr, details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/ansicolor_sink.cpp"
|
||||
#include "ansicolor_sink-inl.h"
|
||||
#endif
|
@@ -1,12 +1,3 @@
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/sinks/base_sink.h"
|
||||
|
||||
#include "spdlog/details/null_mutex.h"
|
||||
#include <mutex>
|
||||
template class spdlog::sinks::base_sink<std::mutex>;
|
||||
template class spdlog::sinks::base_sink<spdlog::details::null_mutex>;
|
||||
#endif
|
||||
|
||||
#include "spdlog/common.h"
|
||||
#include "spdlog/details/pattern_formatter.h"
|
||||
|
@@ -40,5 +40,5 @@ protected:
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/base_sink.cpp"
|
||||
#include "base_sink-inl.h"
|
||||
#endif
|
@@ -1,10 +1,6 @@
|
||||
#include "spdlog/common.h"
|
||||
#include "spdlog/details/pattern_formatter.h"
|
||||
|
||||
#ifdef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/sinks/sink.h"
|
||||
#endif
|
||||
|
||||
SPDLOG_INLINE spdlog::sinks::sink::sink()
|
||||
: formatter_{details::make_unique<spdlog::pattern_formatter>()}
|
||||
{
|
@@ -42,5 +42,5 @@ protected:
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#include "spdlog/impl/sink.cpp"
|
||||
#include "sink-inl.h"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user