Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
6ae240c0
Commit
6ae240c0
authored
Aug 13, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code formatting and clang tidy warnings fixes
parent
05d6960e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ansicolor_sink.h
include/spdlog/sinks/ansicolor_sink.h
+5
-5
No files found.
include/spdlog/sinks/ansicolor_sink.h
View file @
6ae240c0
...
...
@@ -24,7 +24,7 @@ namespace sinks {
* If no color terminal detected, omit the escape codes.
*/
template
<
typename
TargetStream
,
class
ConsoleMutex
>
class
ansicolor_sink
:
public
sink
class
ansicolor_sink
SPDLOG_FINAL
:
public
sink
{
public
:
using
mutex_t
=
typename
ConsoleMutex
::
mutex_t
;
...
...
@@ -84,7 +84,7 @@ public:
const
std
::
string
on_cyan
=
"
\033
[46m"
;
const
std
::
string
on_white
=
"
\033
[47m"
;
void
log
(
const
details
::
log_msg
&
msg
)
SPDLOG_FINAL
override
void
log
(
const
details
::
log_msg
&
msg
)
override
{
// Wrap the originally formatted message in color codes.
// If color is not supported in the terminal, log as is instead.
...
...
@@ -110,19 +110,19 @@ public:
fflush
(
target_file_
);
}
void
flush
()
SPDLOG_FINAL
override
void
flush
()
override
{
std
::
lock_guard
<
mutex_t
>
lock
(
mutex_
);
fflush
(
target_file_
);
}
void
set_pattern
(
const
std
::
string
&
pattern
)
override
SPDLOG_FINAL
void
set_pattern
(
const
std
::
string
&
pattern
)
SPDLOG_FINAL
{
std
::
lock_guard
<
mutex_t
>
lock
(
mutex_
);
formatter_
=
std
::
unique_ptr
<
spdlog
::
formatter
>
(
new
pattern_formatter
(
pattern
));
}
void
set_formatter
(
std
::
unique_ptr
<
spdlog
::
formatter
>
sink_formatter
)
override
SPDLOG_FINAL
void
set_formatter
(
std
::
unique_ptr
<
spdlog
::
formatter
>
sink_formatter
)
override
{
std
::
lock_guard
<
mutex_t
>
lock
(
mutex_
);
formatter_
=
std
::
move
(
sink_formatter
);
...
...
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