mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 11:29:01 +08:00
formatting
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
#define SPDLOG_ANDROID_RETRIES 2
|
||||
#endif
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
|
||||
/*
|
||||
* Android sink (logging using __android_log_write)
|
||||
@@ -84,6 +85,7 @@ private:
|
||||
bool _use_raw_msg;
|
||||
};
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#endif
|
||||
|
@@ -12,7 +12,8 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
|
||||
/**
|
||||
* This sink prefixes the output with an ANSI escape sequence color code depending on the severity
|
||||
@@ -133,4 +134,5 @@ public:
|
||||
using ansicolor_stderr_sink_mt = ansicolor_stderr_sink<std::mutex>;
|
||||
using ansicolor_stderr_sink_st = ansicolor_stderr_sink<details::null_mutex>;
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
@@ -17,7 +17,8 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
template<class Mutex>
|
||||
class base_sink : public sink
|
||||
{
|
||||
@@ -44,4 +45,5 @@ protected:
|
||||
virtual void _flush() = 0;
|
||||
Mutex _mutex;
|
||||
};
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
@@ -17,7 +17,8 @@
|
||||
|
||||
// Distribution sink (mux). Stores a vector of sinks which get called when log is called
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
template<class Mutex>
|
||||
class dist_sink : public base_sink<Mutex>
|
||||
{
|
||||
@@ -66,4 +67,5 @@ public:
|
||||
using dist_sink_mt = dist_sink<std::mutex>;
|
||||
using dist_sink_st = dist_sink<details::null_mutex>;
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
@@ -18,7 +18,8 @@
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
/*
|
||||
* Trivial file sink with single file as target
|
||||
*/
|
||||
@@ -246,4 +247,5 @@ private:
|
||||
using daily_file_sink_mt = daily_file_sink<std::mutex>;
|
||||
using daily_file_sink_st = daily_file_sink<details::null_mutex>;
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
@@ -15,7 +15,8 @@
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
/*
|
||||
* MSVC sink (logging using OutputDebugStringA)
|
||||
*/
|
||||
@@ -37,6 +38,7 @@ protected:
|
||||
using msvc_sink_mt = msvc_sink<std::mutex>;
|
||||
using msvc_sink_st = msvc_sink<details::null_mutex>;
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#endif
|
||||
|
@@ -10,7 +10,8 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
|
||||
template<class Mutex>
|
||||
class null_sink : public base_sink<Mutex>
|
||||
@@ -24,4 +25,5 @@ protected:
|
||||
using null_sink_mt = null_sink<details::null_mutex>;
|
||||
using null_sink_st = null_sink<details::null_mutex>;
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
@@ -11,7 +11,8 @@
|
||||
#include <mutex>
|
||||
#include <ostream>
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
template<class Mutex>
|
||||
class ostream_sink : public base_sink<Mutex>
|
||||
{
|
||||
@@ -44,4 +45,5 @@ protected:
|
||||
using ostream_sink_mt = ostream_sink<std::mutex>;
|
||||
using ostream_sink_st = ostream_sink<details::null_mutex>;
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
@@ -7,7 +7,8 @@
|
||||
|
||||
#include "../details/log_msg.h"
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
class sink
|
||||
{
|
||||
public:
|
||||
@@ -39,4 +40,5 @@ inline level::level_enum sink::level() const
|
||||
return static_cast<spdlog::level::level_enum>(_level.load(std::memory_order_relaxed));
|
||||
}
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
@@ -12,7 +12,8 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
|
||||
template<class Mutex>
|
||||
class stdout_sink SPDLOG_FINAL : public base_sink<Mutex>
|
||||
@@ -74,4 +75,5 @@ protected:
|
||||
using stderr_sink_mt = stderr_sink<std::mutex>;
|
||||
using stderr_sink_st = stderr_sink<details::null_mutex>;
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
@@ -16,7 +16,8 @@
|
||||
#include <string>
|
||||
#include <syslog.h>
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
/**
|
||||
* Sink that write to syslog using the `syscall()` library call.
|
||||
*
|
||||
@@ -69,6 +70,7 @@ private:
|
||||
return _priorities[static_cast<size_t>(msg.level)];
|
||||
}
|
||||
};
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#endif
|
||||
|
@@ -14,7 +14,8 @@
|
||||
#include <unordered_map>
|
||||
#include <wincon.h>
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
/*
|
||||
* Windows color console sink. Uses WriteConsoleA to write to the console with colors
|
||||
*/
|
||||
@@ -119,4 +120,5 @@ public:
|
||||
using wincolor_stderr_sink_mt = wincolor_stderr_sink<std::mutex>;
|
||||
using wincolor_stderr_sink_st = wincolor_stderr_sink<details::null_mutex>;
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
@@ -9,7 +9,8 @@
|
||||
|
||||
#include "msvc_sink.h"
|
||||
|
||||
namespace spdlog { namespace sinks {
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
|
||||
/*
|
||||
* Windows debug sink (logging using OutputDebugStringA, synonym for msvc_sink)
|
||||
@@ -20,6 +21,7 @@ using windebug_sink = msvc_sink<Mutex>;
|
||||
using windebug_sink_mt = msvc_sink_mt;
|
||||
using windebug_sink_st = msvc_sink_st;
|
||||
|
||||
}} // namespace spdlog::sinks
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user