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
a9abfbb0
Commit
a9abfbb0
authored
Nov 15, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed rotate bug
parent
bbc67713
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
file_helper.h
include/spdlog/details/file_helper.h
+8
-0
file_sinks.h
include/spdlog/sinks/file_sinks.h
+1
-6
No files found.
include/spdlog/details/file_helper.h
View file @
a9abfbb0
...
...
@@ -80,6 +80,14 @@ public:
throw
spdlog_ex
(
"Failed opening file "
+
fname
+
" for writing"
);
}
void
reopen
()
{
if
(
_filename
.
empty
())
throw
spdlog_ex
(
"Failed re opening file - was not opened before"
);
open
(
_filename
);
}
void
close
()
{
if
(
_fd
)
...
...
include/spdlog/sinks/file_sinks.h
View file @
a9abfbb0
...
...
@@ -136,12 +136,7 @@ private:
throw
spdlog_ex
(
"rotating_file_sink: failed renaming "
+
src
+
" to "
+
target
);
}
}
auto
cur_name
=
_file_helper
.
filename
();
if
(
std
::
remove
(
cur_name
.
c_str
())
!=
0
)
{
throw
spdlog_ex
(
"rotating_file_sink: failed removing "
+
cur_name
);
}
_file_helper
.
open
(
cur_name
);
_file_helper
.
reopen
();
}
std
::
string
_base_filename
;
std
::
string
_extension
;
...
...
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