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
0b86d6a4
Commit
0b86d6a4
authored
May 26, 2020
by
IIFEgit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix deadlock on filename() call
parent
3dedb521
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
15 deletions
+1
-15
include/spdlog/sinks/daily_file_sink.h
include/spdlog/sinks/daily_file_sink.h
+1
-7
include/spdlog/sinks/rotating_file_sink-inl.h
include/spdlog/sinks/rotating_file_sink-inl.h
+0
-7
include/spdlog/sinks/rotating_file_sink.h
include/spdlog/sinks/rotating_file_sink.h
+0
-1
No files found.
include/spdlog/sinks/daily_file_sink.h
View file @
0b86d6a4
...
...
@@ -70,12 +70,6 @@ public:
}
}
filename_t
filename
()
{
std
::
lock_guard
<
Mutex
>
lock
(
base_sink
<
Mutex
>::
mutex_
);
return
file_helper_
.
filename
();
}
protected:
void
sink_it_
(
const
details
::
log_msg
&
msg
)
override
{
...
...
@@ -155,7 +149,7 @@ private:
using
details
::
os
::
filename_to_str
;
using
details
::
os
::
remove_if_exists
;
filename_t
current_file
=
filename
();
filename_t
current_file
=
file
_helper_
.
file
name
();
if
(
filenames_q_
.
full
())
{
auto
old_filename
=
std
::
move
(
filenames_q_
.
front
());
...
...
include/spdlog/sinks/rotating_file_sink-inl.h
View file @
0b86d6a4
...
...
@@ -53,13 +53,6 @@ SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::calc_filename(const filename
return
fmt
::
format
(
SPDLOG_FILENAME_T
(
"{}.{}{}"
),
basename
,
index
,
ext
);
}
template
<
typename
Mutex
>
SPDLOG_INLINE
filename_t
rotating_file_sink
<
Mutex
>::
filename
()
{
std
::
lock_guard
<
Mutex
>
lock
(
base_sink
<
Mutex
>::
mutex_
);
return
file_helper_
.
filename
();
}
template
<
typename
Mutex
>
SPDLOG_INLINE
void
rotating_file_sink
<
Mutex
>::
sink_it_
(
const
details
::
log_msg
&
msg
)
{
...
...
include/spdlog/sinks/rotating_file_sink.h
View file @
0b86d6a4
...
...
@@ -24,7 +24,6 @@ class rotating_file_sink final : public base_sink<Mutex>
public:
rotating_file_sink
(
filename_t
base_filename
,
std
::
size_t
max_size
,
std
::
size_t
max_files
,
bool
rotate_on_open
=
false
);
static
filename_t
calc_filename
(
const
filename_t
&
filename
,
std
::
size_t
index
);
filename_t
filename
();
protected:
void
sink_it_
(
const
details
::
log_msg
&
msg
)
override
;
...
...
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