Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgabime <galim120@bezeqint.net>2014-11-01 03:28:49 +0300
committergabime <galim120@bezeqint.net>2014-11-01 03:28:49 +0300
commite8403e17dfcc547484c8363a08333ae8a99d767c (patch)
tree7c1e66f8e3bbae440b61d87e9f2050d63233ecb6 /include/spdlog
parent1c7b3e4eb2fb5caf0852f2a4af105b359a5906a9 (diff)
astyle
Diffstat (limited to 'include/spdlog')
-rw-r--r--include/spdlog/common.h6
-rw-r--r--include/spdlog/details/fast_istostr.h9
-rw-r--r--include/spdlog/details/logger_impl.h6
-rw-r--r--include/spdlog/details/null_mutex.h6
-rw-r--r--include/spdlog/details/pattern_formatter_impl.h8
-rw-r--r--include/spdlog/details/registry.h9
-rw-r--r--include/spdlog/details/spdlog_impl.h3
-rw-r--r--include/spdlog/formatter.h3
-rw-r--r--include/spdlog/sinks/null_sink.h6
9 files changed, 35 insertions, 21 deletions
diff --git a/include/spdlog/common.h b/include/spdlog/common.h
index 96118743..9fc5416e 100644
--- a/include/spdlog/common.h
+++ b/include/spdlog/common.h
@@ -6,7 +6,8 @@
namespace spdlog
{
class formatter;
-namespace sinks {
+namespace sinks
+{
class sink;
}
@@ -45,7 +46,8 @@ class spdlog_ex : public std::exception
{
public:
spdlog_ex(const std::string& msg) :_msg(msg) {};
- const char* what() const throw() override {
+ const char* what() const throw() override
+ {
return _msg.c_str();
}
private:
diff --git a/include/spdlog/details/fast_istostr.h b/include/spdlog/details/fast_istostr.h
index 3855d57a..4efeb515 100644
--- a/include/spdlog/details/fast_istostr.h
+++ b/include/spdlog/details/fast_istostr.h
@@ -5,10 +5,13 @@
//Source: http://stackoverflow.com/a/4351484/192001
//Modified version to pad zeros according to padding arg
-namespace spdlog {
-namespace details {
+namespace spdlog
+{
+namespace details
+{
-const char digit_pairs[201] = {
+const char digit_pairs[201] =
+{
"00010203040506070809"
"10111213141516171819"
"20212223242526272829"
diff --git a/include/spdlog/details/logger_impl.h b/include/spdlog/details/logger_impl.h
index 2deadd3a..5fa2ee78 100644
--- a/include/spdlog/details/logger_impl.h
+++ b/include/spdlog/details/logger_impl.h
@@ -43,7 +43,8 @@ inline spdlog::formatter_ptr spdlog::logger::get_formatter() const
template <typename... Args>
-inline spdlog::details::line_logger spdlog::logger::log(level::level_enum lvl, const Args&... args) {
+inline spdlog::details::line_logger spdlog::logger::log(level::level_enum lvl, const Args&... args)
+{
bool msg_enabled = should_log(lvl);
details::line_logger l(this, lvl, msg_enabled);
if (msg_enabled)
@@ -52,7 +53,8 @@ inline spdlog::details::line_logger spdlog::logger::log(level::level_enum lvl, c
}
template <typename... Args>
-inline spdlog::details::line_logger spdlog::logger::log(const Args&... args) {
+inline spdlog::details::line_logger spdlog::logger::log(const Args&... args)
+{
return log(level::ALWAYS, args...);
}
diff --git a/include/spdlog/details/null_mutex.h b/include/spdlog/details/null_mutex.h
index 54c354c5..3f7b7eea 100644
--- a/include/spdlog/details/null_mutex.h
+++ b/include/spdlog/details/null_mutex.h
@@ -2,8 +2,10 @@
// null, no cost mutex
-namespace spdlog {
-namespace details {
+namespace spdlog
+{
+namespace details
+{
struct null_mutex
{
void lock() {}
diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h
index 3ae6a307..0176f0a8 100644
--- a/include/spdlog/details/pattern_formatter_impl.h
+++ b/include/spdlog/details/pattern_formatter_impl.h
@@ -13,7 +13,8 @@
namespace spdlog
{
-namespace details {
+namespace details
+{
class flag_formatter
{
public:
@@ -23,7 +24,8 @@ public:
///////////////////////////////////////////////////////////////////////
// name & level pattern appenders
///////////////////////////////////////////////////////////////////////
-namespace {
+namespace
+{
class name_formatter :public flag_formatter
{
void format(details::log_msg& msg) override
@@ -425,7 +427,7 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
{
switch (flag)
{
- // logger name
+ // logger name
case 'n':
_formatters.push_back(std::unique_ptr<details::flag_formatter>(new details::name_formatter()));
break;
diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h
index c99f52d6..1b0ec967 100644
--- a/include/spdlog/details/registry.h
+++ b/include/spdlog/details/registry.h
@@ -11,10 +11,13 @@
#include "../logger.h"
#include "../common.h"
-namespace spdlog {
-namespace details {
+namespace spdlog
+{
+namespace details
+{
-class registry {
+class registry
+{
public:
std::shared_ptr<logger> get(const std::string& logger_name)
{
diff --git a/include/spdlog/details/spdlog_impl.h b/include/spdlog/details/spdlog_impl.h
index 84264465..6cfccfd0 100644
--- a/include/spdlog/details/spdlog_impl.h
+++ b/include/spdlog/details/spdlog_impl.h
@@ -57,9 +57,6 @@ inline std::shared_ptr<spdlog::logger> spdlog::stderr_logger_st(const std::strin
}
-
-
-
inline std::shared_ptr<spdlog::logger> spdlog::create(const std::string& logger_name, spdlog::sinks_init_list sinks)
{
return details::registry::instance().create(logger_name, sinks);
diff --git a/include/spdlog/formatter.h b/include/spdlog/formatter.h
index 8575c073..d123aed3 100644
--- a/include/spdlog/formatter.h
+++ b/include/spdlog/formatter.h
@@ -3,7 +3,8 @@
#include "details/log_msg.h"
namespace spdlog
{
-namespace details {
+namespace details
+{
class flag_formatter;
}
diff --git a/include/spdlog/sinks/null_sink.h b/include/spdlog/sinks/null_sink.h
index c75c3884..07c05343 100644
--- a/include/spdlog/sinks/null_sink.h
+++ b/include/spdlog/sinks/null_sink.h
@@ -4,8 +4,10 @@
#include "../details/null_mutex.h"
-namespace spdlog {
-namespace sinks {
+namespace spdlog
+{
+namespace sinks
+{
template <class Mutex>
class null_sink : public base_sink<Mutex>