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
36f25389
Commit
36f25389
authored
Aug 25, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass logger name to tracer
parent
8280c0d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
include/spdlog/logger-inl.h
include/spdlog/logger-inl.h
+1
-1
include/spdlog/sinks/backtrace-sink.h
include/spdlog/sinks/backtrace-sink.h
+3
-4
No files found.
include/spdlog/logger-inl.h
View file @
36f25389
...
...
@@ -165,7 +165,7 @@ SPDLOG_INLINE void logger::dump_backtrace()
if
(
backtrace_sink_
)
{
auto
tracer
=
static_cast
<
sinks
::
backtrace_sink_mt
*>
(
backtrace_sink_
.
get
());
tracer
->
dump_backtrace
();
tracer
->
dump_backtrace
(
name
()
);
}
}
...
...
include/spdlog/sinks/backtrace-sink.h
View file @
36f25389
...
...
@@ -40,10 +40,10 @@ public:
return
filter_level_
;
}
void
dump_backtrace
()
void
dump_backtrace
(
string_view_t
logger_name
)
{
std
::
lock_guard
<
Mutex
>
lock
(
base_sink
<
Mutex
>::
mutex_
);
dump_backtrace_
();
dump_backtrace_
(
logger_name
);
}
protected:
...
...
@@ -61,13 +61,12 @@ protected:
}
}
void
dump_backtrace_
()
void
dump_backtrace_
(
string_view_t
logger_name
)
{
if
(
traceback_msgs_
.
empty
())
{
return
;
}
const
char
*
logger_name
=
"??????"
;
dist_sink
<
Mutex
>::
sink_it_
(
details
::
log_msg
{
logger_name
,
level
::
info
,
"********************* Backtrace Start *********************"
});
...
...
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