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
6b7f3db2
Commit
6b7f3db2
authored
Aug 25, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed async sink_it
parent
eec6e28b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
async_logger-inl.h
include/spdlog/async_logger-inl.h
+18
-5
No files found.
include/spdlog/async_logger-inl.h
View file @
6b7f3db2
...
...
@@ -49,16 +49,31 @@ SPDLOG_INLINE void spdlog::async_logger::dump_backtrace_()
if
(
auto
pool_ptr
=
thread_pool_
.
lock
())
{
pool_ptr
->
post_dump_backtrace
(
shared_from_this
(),
overflow_policy_
);
}
else
{
SPDLOG_THROW
(
spdlog_ex
(
"async dumptrace: thread pool doesn't exist anymore"
));
SPDLOG_THROW
(
spdlog_ex
(
"async dump
_back
trace: thread pool doesn't exist anymore"
));
}
}
//
// backend functions - called from the thread pool to do the actual job
//
SPDLOG_INLINE
void
spdlog
::
async_logger
::
backend_sink_it_
(
const
details
::
log_msg
&
incoming_log_
msg
)
SPDLOG_INLINE
void
spdlog
::
async_logger
::
backend_sink_it_
(
const
details
::
log_msg
&
msg
)
{
spdlog
::
logger
::
sink_it_
(
incoming_log_msg
);
for
(
auto
&
sink
:
sinks_
)
{
if
(
sink
->
should_log
(
msg
.
level
))
{
SPDLOG_TRY
{
sink
->
log
(
msg
);
}
SPDLOG_LOGGER_CATCH
()
}
}
if
(
should_flush_
(
msg
))
{
backend_flush_
();
}
}
SPDLOG_INLINE
void
spdlog
::
async_logger
::
backend_flush_
()
...
...
@@ -66,8 +81,6 @@ SPDLOG_INLINE void spdlog::async_logger::backend_flush_()
spdlog
::
logger
::
flush_
();
}
SPDLOG_INLINE
void
spdlog
::
async_logger
::
backend_dump_backtrace_
()
{
spdlog
::
logger
::
dump_backtrace_
();
...
...
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