Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
56e4a201
Commit
56e4a201
authored
Mar 17, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formatting
parent
c739e680
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
98 additions
and
48 deletions
+98
-48
include/spdlog/common.h
include/spdlog/common.h
+4
-2
include/spdlog/details/async_log_helper.h
include/spdlog/details/async_log_helper.h
+4
-2
include/spdlog/details/file_helper.h
include/spdlog/details/file_helper.h
+4
-2
include/spdlog/details/log_msg.h
include/spdlog/details/log_msg.h
+4
-2
include/spdlog/details/mpmc_bounded_q.h
include/spdlog/details/mpmc_bounded_q.h
+4
-2
include/spdlog/details/null_mutex.h
include/spdlog/details/null_mutex.h
+4
-2
include/spdlog/details/os.h
include/spdlog/details/os.h
+6
-2
include/spdlog/details/pattern_formatter_impl.h
include/spdlog/details/pattern_formatter_impl.h
+4
-2
include/spdlog/details/registry.h
include/spdlog/details/registry.h
+4
-2
include/spdlog/fmt/bundled/format.h
include/spdlog/fmt/bundled/format.h
+8
-4
include/spdlog/sinks/android_sink.h
include/spdlog/sinks/android_sink.h
+4
-2
include/spdlog/sinks/ansicolor_sink.h
include/spdlog/sinks/ansicolor_sink.h
+4
-2
include/spdlog/sinks/base_sink.h
include/spdlog/sinks/base_sink.h
+4
-2
include/spdlog/sinks/dist_sink.h
include/spdlog/sinks/dist_sink.h
+4
-2
include/spdlog/sinks/file_sinks.h
include/spdlog/sinks/file_sinks.h
+4
-2
include/spdlog/sinks/msvc_sink.h
include/spdlog/sinks/msvc_sink.h
+4
-2
include/spdlog/sinks/null_sink.h
include/spdlog/sinks/null_sink.h
+4
-2
include/spdlog/sinks/ostream_sink.h
include/spdlog/sinks/ostream_sink.h
+4
-2
include/spdlog/sinks/sink.h
include/spdlog/sinks/sink.h
+4
-2
include/spdlog/sinks/stdout_sinks.h
include/spdlog/sinks/stdout_sinks.h
+4
-2
include/spdlog/sinks/syslog_sink.h
include/spdlog/sinks/syslog_sink.h
+4
-2
include/spdlog/sinks/wincolor_sink.h
include/spdlog/sinks/wincolor_sink.h
+4
-2
include/spdlog/sinks/windebug_sink.h
include/spdlog/sinks/windebug_sink.h
+4
-2
No files found.
include/spdlog/common.h
View file @
56e4a201
...
...
@@ -143,9 +143,11 @@ enum class pattern_time_type
//
// Log exception
//
namespace
details
{
namespace
os
{
namespace
details
{
namespace
os
{
std
::
string
errno_str
(
int
err_num
);
}}
// namespace details::os
}
}
// namespace details
class
spdlog_ex
:
public
std
::
exception
{
public:
...
...
include/spdlog/details/async_log_helper.h
View file @
56e4a201
...
...
@@ -28,7 +28,8 @@
#include <utility>
#include <vector>
namespace
spdlog
{
namespace
details
{
namespace
spdlog
{
namespace
details
{
class
async_log_helper
{
...
...
@@ -184,7 +185,8 @@ private:
// wait until the queue is empty
void
wait_empty_q
();
};
}}
// namespace spdlog::details
}
// namespace details
}
// namespace spdlog
///////////////////////////////////////////////////////////////////////////////
// async_sink class implementation
...
...
include/spdlog/details/file_helper.h
View file @
56e4a201
...
...
@@ -19,7 +19,8 @@
#include <thread>
#include <tuple>
namespace
spdlog
{
namespace
details
{
namespace
spdlog
{
namespace
details
{
class
file_helper
{
...
...
@@ -136,4 +137,5 @@ private:
FILE
*
_fd
{
nullptr
};
filename_t
_filename
;
};
}}
// namespace spdlog::details
}
// namespace details
}
// namespace spdlog
include/spdlog/details/log_msg.h
View file @
56e4a201
...
...
@@ -11,7 +11,8 @@
#include <string>
#include <utility>
namespace
spdlog
{
namespace
details
{
namespace
spdlog
{
namespace
details
{
struct
log_msg
{
log_msg
()
=
default
;
...
...
@@ -40,4 +41,5 @@ struct log_msg
fmt
::
MemoryWriter
formatted
;
size_t
msg_id
{
0
};
};
}}
// namespace spdlog::details
}
// namespace details
}
// namespace spdlog
include/spdlog/details/mpmc_bounded_q.h
View file @
56e4a201
...
...
@@ -48,7 +48,8 @@ Distributed under the MIT License (http://opensource.org/licenses/MIT)
#include <atomic>
#include <utility>
namespace
spdlog
{
namespace
details
{
namespace
spdlog
{
namespace
details
{
template
<
typename
T
>
class
mpmc_bounded_queue
...
...
@@ -166,4 +167,5 @@ private:
cacheline_pad_t
pad3_
;
};
}}
// namespace spdlog::details
}
// namespace details
}
// namespace spdlog
include/spdlog/details/null_mutex.h
View file @
56e4a201
...
...
@@ -8,7 +8,8 @@
#include <atomic>
// null, no cost dummy "mutex" and dummy "atomic" int
namespace
spdlog
{
namespace
details
{
namespace
spdlog
{
namespace
details
{
struct
null_mutex
{
void
lock
()
{}
...
...
@@ -40,4 +41,5 @@ struct null_atomic_int
}
};
}}
// namespace spdlog::details
}
// namespace details
}
// namespace spdlog
include/spdlog/details/os.h
View file @
56e4a201
...
...
@@ -53,7 +53,9 @@
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif
namespace
spdlog
{
namespace
details
{
namespace
os
{
namespace
spdlog
{
namespace
details
{
namespace
os
{
inline
spdlog
::
log_clock
::
time_point
now
()
{
...
...
@@ -445,4 +447,6 @@ inline bool in_terminal(FILE *file)
return
isatty
(
fileno
(
file
))
!=
0
;
#endif
}
}}}
// namespace spdlog::details::os
}
// namespace os
}
// namespace details
}
// namespace spdlog
include/spdlog/details/pattern_formatter_impl.h
View file @
56e4a201
...
...
@@ -20,7 +20,8 @@
#include <utility>
#include <vector>
namespace
spdlog
{
namespace
details
{
namespace
spdlog
{
namespace
details
{
class
flag_formatter
{
public:
...
...
@@ -466,7 +467,8 @@ class full_formatter SPDLOG_FINAL : public flag_formatter
}
};
}}
// namespace spdlog::details
}
// namespace details
}
// namespace spdlog
///////////////////////////////////////////////////////////////////////////////
// pattern_formatter inline impl
///////////////////////////////////////////////////////////////////////////////
...
...
include/spdlog/details/registry.h
View file @
56e4a201
...
...
@@ -22,7 +22,8 @@
#include <string>
#include <unordered_map>
namespace
spdlog
{
namespace
details
{
namespace
spdlog
{
namespace
details
{
template
<
class
Mutex
>
class
registry_t
{
...
...
@@ -232,4 +233,5 @@ using registry = registry_t<spdlog::details::null_mutex>;
using
registry
=
registry_t
<
std
::
mutex
>
;
#endif
}}
// namespace spdlog::details
}
// namespace details
}
// namespace spdlog
include/spdlog/fmt/bundled/format.h
View file @
56e4a201
...
...
@@ -345,7 +345,8 @@ typedef __int64 intmax_t;
#if FMT_MSC_VER && !defined(FMT_BUILTIN_CLZLL) && !defined(_MANAGED)
#include <intrin.h> // _BitScanReverse, _BitScanReverse64
namespace
fmt
{
namespace
internal
{
namespace
fmt
{
namespace
internal
{
// avoid Clang with Microsoft CodeGen's -Wunknown-pragmas warning
#ifndef __clang__
#pragma intrinsic(_BitScanReverse)
...
...
@@ -391,10 +392,12 @@ inline uint32_t clzll(uint64_t x)
return
63
-
r
;
}
#define FMT_BUILTIN_CLZLL(n) fmt::internal::clzll(n)
}}
// namespace fmt::internal
}
// namespace internal
}
// namespace fmt
#endif
namespace
fmt
{
namespace
internal
{
namespace
fmt
{
namespace
internal
{
struct
DummyInt
{
int
data
[
2
];
...
...
@@ -439,7 +442,8 @@ inline T const_check(T value)
{
return
value
;
}
}}
// namespace fmt::internal
}
// namespace internal
}
// namespace fmt
namespace
std
{
// Standard permits specialization of std::numeric_limits. This specialization
...
...
include/spdlog/sinks/android_sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/ansicolor_sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/base_sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/dist_sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/file_sinks.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/msvc_sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/null_sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/ostream_sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/stdout_sinks.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/syslog_sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/wincolor_sink.h
View file @
56e4a201
...
...
@@ -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
include/spdlog/sinks/windebug_sink.h
View file @
56e4a201
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment