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
7fe3912f
Commit
7fe3912f
authored
Feb 23, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
astyle
parent
7eb41ccf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
37 deletions
+37
-37
include/spdlog/details/async_log_helper.h
include/spdlog/details/async_log_helper.h
+2
-2
include/spdlog/details/pattern_formatter_impl.h
include/spdlog/details/pattern_formatter_impl.h
+35
-35
No files found.
include/spdlog/details/async_log_helper.h
View file @
7fe3912f
...
...
@@ -216,9 +216,9 @@ inline spdlog::details::async_log_helper::async_log_helper(
_overflow_policy
(
overflow_policy
),
_worker_warmup_cb
(
worker_warmup_cb
),
_flush_interval_ms
(
flush_interval_ms
),
_worker_teardown_cb
(
worker_teardown_cb
)
_worker_teardown_cb
(
worker_teardown_cb
)
{
_worker_thread
=
std
::
thread
(
&
async_log_helper
::
worker_loop
,
this
);
_worker_thread
=
std
::
thread
(
&
async_log_helper
::
worker_loop
,
this
);
}
// Send to the worker thread termination message(level=off)
...
...
include/spdlog/details/pattern_formatter_impl.h
View file @
7fe3912f
...
...
@@ -502,7 +502,7 @@ inline void spdlog::pattern_formatter::compile_pattern(const std::string& patter
if
(
*
it
==
'%'
)
{
if
(
user_chars
)
//append user chars found so far
_formatters
.
push_back
(
std
::
move
(
user_chars
));
_formatters
.
push_back
(
std
::
move
(
user_chars
));
if
(
++
it
!=
end
)
handle_flag
(
*
it
);
else
...
...
@@ -526,136 +526,136 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
switch
(
flag
)
{
// logger name
case
'n'
:
_formatters
.
emplace_back
(
new
details
::
name_formatter
());
case
'n'
:
_formatters
.
emplace_back
(
new
details
::
name_formatter
());
break
;
case
'l'
:
_formatters
.
emplace_back
(
new
details
::
level_formatter
());
_formatters
.
emplace_back
(
new
details
::
level_formatter
());
break
;
case
'L'
:
_formatters
.
emplace_back
(
new
details
::
short_level_formatter
());
_formatters
.
emplace_back
(
new
details
::
short_level_formatter
());
break
;
case
(
't'
):
_formatters
.
emplace_back
(
new
details
::
t_formatter
());
_formatters
.
emplace_back
(
new
details
::
t_formatter
());
break
;
case
(
'v'
):
_formatters
.
emplace_back
(
new
details
::
v_formatter
());
_formatters
.
emplace_back
(
new
details
::
v_formatter
());
break
;
case
(
'a'
):
_formatters
.
emplace_back
(
new
details
::
a_formatter
());
_formatters
.
emplace_back
(
new
details
::
a_formatter
());
break
;
case
(
'A'
):
_formatters
.
emplace_back
(
new
details
::
A_formatter
());
_formatters
.
emplace_back
(
new
details
::
A_formatter
());
break
;
case
(
'b'
):
case
(
'h'
):
_formatters
.
emplace_back
(
new
details
::
b_formatter
());
_formatters
.
emplace_back
(
new
details
::
b_formatter
());
break
;
case
(
'B'
):
_formatters
.
emplace_back
(
new
details
::
B_formatter
());
_formatters
.
emplace_back
(
new
details
::
B_formatter
());
break
;
case
(
'c'
):
_formatters
.
emplace_back
(
new
details
::
c_formatter
());
_formatters
.
emplace_back
(
new
details
::
c_formatter
());
break
;
case
(
'C'
):
_formatters
.
emplace_back
(
new
details
::
C_formatter
());
_formatters
.
emplace_back
(
new
details
::
C_formatter
());
break
;
case
(
'Y'
):
_formatters
.
emplace_back
(
new
details
::
Y_formatter
());
_formatters
.
emplace_back
(
new
details
::
Y_formatter
());
break
;
case
(
'D'
):
case
(
'x'
):
_formatters
.
emplace_back
(
new
details
::
D_formatter
());
_formatters
.
emplace_back
(
new
details
::
D_formatter
());
break
;
case
(
'm'
):
_formatters
.
emplace_back
(
new
details
::
m_formatter
());
_formatters
.
emplace_back
(
new
details
::
m_formatter
());
break
;
case
(
'd'
):
_formatters
.
emplace_back
(
new
details
::
d_formatter
());
_formatters
.
emplace_back
(
new
details
::
d_formatter
());
break
;
case
(
'H'
):
_formatters
.
emplace_back
(
new
details
::
H_formatter
());
_formatters
.
emplace_back
(
new
details
::
H_formatter
());
break
;
case
(
'I'
):
_formatters
.
emplace_back
(
new
details
::
I_formatter
());
_formatters
.
emplace_back
(
new
details
::
I_formatter
());
break
;
case
(
'M'
):
_formatters
.
emplace_back
(
new
details
::
M_formatter
());
_formatters
.
emplace_back
(
new
details
::
M_formatter
());
break
;
case
(
'S'
):
_formatters
.
emplace_back
(
new
details
::
S_formatter
());
_formatters
.
emplace_back
(
new
details
::
S_formatter
());
break
;
case
(
'e'
):
_formatters
.
emplace_back
(
new
details
::
e_formatter
());
_formatters
.
emplace_back
(
new
details
::
e_formatter
());
break
;
case
(
'f'
):
_formatters
.
emplace_back
(
new
details
::
f_formatter
());
_formatters
.
emplace_back
(
new
details
::
f_formatter
());
break
;
case
(
'F'
):
_formatters
.
emplace_back
(
new
details
::
F_formatter
());
_formatters
.
emplace_back
(
new
details
::
F_formatter
());
break
;
case
(
'E'
):
_formatters
.
emplace_back
(
new
details
::
E_formatter
());
_formatters
.
emplace_back
(
new
details
::
E_formatter
());
break
;
case
(
'p'
):
_formatters
.
emplace_back
(
new
details
::
p_formatter
());
_formatters
.
emplace_back
(
new
details
::
p_formatter
());
break
;
case
(
'r'
):
_formatters
.
emplace_back
(
new
details
::
r_formatter
());
_formatters
.
emplace_back
(
new
details
::
r_formatter
());
break
;
case
(
'R'
):
_formatters
.
emplace_back
(
new
details
::
R_formatter
());
_formatters
.
emplace_back
(
new
details
::
R_formatter
());
break
;
case
(
'T'
):
case
(
'X'
):
_formatters
.
emplace_back
(
new
details
::
T_formatter
());
_formatters
.
emplace_back
(
new
details
::
T_formatter
());
break
;
case
(
'z'
):
_formatters
.
emplace_back
(
new
details
::
z_formatter
());
_formatters
.
emplace_back
(
new
details
::
z_formatter
());
break
;
case
(
'+'
):
_formatters
.
emplace_back
(
new
details
::
full_formatter
());
_formatters
.
emplace_back
(
new
details
::
full_formatter
());
break
;
case
(
'P'
):
_formatters
.
emplace_back
(
new
details
::
pid_formatter
());
_formatters
.
emplace_back
(
new
details
::
pid_formatter
());
break
;
case
(
'i'
):
_formatters
.
emplace_back
(
new
details
::
i_formatter
());
_formatters
.
emplace_back
(
new
details
::
i_formatter
());
break
;
default:
//Unknown flag appears as is
_formatters
.
emplace_back
(
new
details
::
ch_formatter
(
'%'
));
_formatters
.
emplace_back
(
new
details
::
ch_formatter
(
flag
));
_formatters
.
emplace_back
(
new
details
::
ch_formatter
(
'%'
));
_formatters
.
emplace_back
(
new
details
::
ch_formatter
(
flag
));
break
;
}
}
...
...
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