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
4f9b4d01
Commit
4f9b4d01
authored
Jul 09, 2016
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in extra formatting done in async mode
parent
30326dad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
include/spdlog/details/async_logger_impl.h
include/spdlog/details/async_logger_impl.h
+1
-1
include/spdlog/details/logger_impl.h
include/spdlog/details/logger_impl.h
+3
-5
No files found.
include/spdlog/details/async_logger_impl.h
View file @
4f9b4d01
...
@@ -72,6 +72,6 @@ inline void spdlog::async_logger::_set_pattern(const std::string& pattern)
...
@@ -72,6 +72,6 @@ inline void spdlog::async_logger::_set_pattern(const std::string& pattern)
inline
void
spdlog
::
async_logger
::
_sink_it
(
details
::
log_msg
&
msg
)
inline
void
spdlog
::
async_logger
::
_sink_it
(
details
::
log_msg
&
msg
)
{
{
_async_log_helper
->
log
(
msg
);
_async_log_helper
->
log
(
msg
);
}
}
include/spdlog/details/logger_impl.h
View file @
4f9b4d01
...
@@ -65,8 +65,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const char* fmt, const Ar
...
@@ -65,8 +65,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const char* fmt, const Ar
{
{
throw
spdlog
::
spdlog_ex
(
std
::
string
(
"format error in
\"
"
)
+
fmt
+
"
\"
: "
+
ex
.
what
());
throw
spdlog
::
spdlog_ex
(
std
::
string
(
"format error in
\"
"
)
+
fmt
+
"
\"
: "
+
ex
.
what
());
}
}
_formatter
->
format
(
log_msg
);
_sink_it
(
log_msg
);
_sink_it
(
log_msg
);
}
}
...
@@ -78,7 +77,6 @@ inline void spdlog::logger::log(level::level_enum lvl, const char* msg)
...
@@ -78,7 +77,6 @@ inline void spdlog::logger::log(level::level_enum lvl, const char* msg)
details
::
log_msg
log_msg
(
&
_name
,
lvl
);
details
::
log_msg
log_msg
(
&
_name
,
lvl
);
log_msg
.
raw
<<
msg
;
log_msg
.
raw
<<
msg
;
_formatter
->
format
(
log_msg
);
_sink_it
(
log_msg
);
_sink_it
(
log_msg
);
}
}
...
@@ -89,8 +87,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const T& msg)
...
@@ -89,8 +87,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const T& msg)
if
(
!
should_log
(
lvl
))
return
;
if
(
!
should_log
(
lvl
))
return
;
details
::
log_msg
log_msg
(
&
_name
,
lvl
);
details
::
log_msg
log_msg
(
&
_name
,
lvl
);
log_msg
.
raw
<<
msg
;
log_msg
.
raw
<<
msg
;
_formatter
->
format
(
log_msg
);
_sink_it
(
log_msg
);
_sink_it
(
log_msg
);
}
}
...
@@ -208,6 +205,7 @@ inline bool spdlog::logger::should_log(spdlog::level::level_enum msg_level) cons
...
@@ -208,6 +205,7 @@ inline bool spdlog::logger::should_log(spdlog::level::level_enum msg_level) cons
//
//
inline
void
spdlog
::
logger
::
_sink_it
(
details
::
log_msg
&
msg
)
inline
void
spdlog
::
logger
::
_sink_it
(
details
::
log_msg
&
msg
)
{
{
_formatter
->
format
(
msg
);
for
(
auto
&
sink
:
_sinks
)
for
(
auto
&
sink
:
_sinks
)
sink
->
log
(
msg
);
sink
->
log
(
msg
);
...
...
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