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
bd759bfc
Commit
bd759bfc
authored
Jul 05, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed force_flush from simple logger
parent
4a90950f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
include/spdlog/sinks/simple_file_sink.h
include/spdlog/sinks/simple_file_sink.h
+1
-10
No files found.
include/spdlog/sinks/simple_file_sink.h
View file @
bd759bfc
...
...
@@ -22,24 +22,16 @@ class simple_file_sink SPDLOG_FINAL : public base_sink<Mutex>
{
public:
explicit
simple_file_sink
(
const
filename_t
&
filename
,
bool
truncate
=
false
)
:
force_flush_
(
false
)
{
file_helper_
.
open
(
filename
,
truncate
);
}
void
set_force_flush
(
bool
force_flush
)
{
force_flush_
=
force_flush
;
}
protected:
void
sink_it_
(
const
details
::
log_msg
&
,
const
fmt
::
memory_buffer
&
formatted
)
override
{
file_helper_
.
write
(
formatted
);
if
(
force_flush_
)
{
file_helper_
.
flush
();
}
}
void
flush_
()
override
...
...
@@ -49,7 +41,6 @@ protected:
private:
details
::
file_helper
file_helper_
;
bool
force_flush_
;
};
using
simple_file_sink_mt
=
simple_file_sink
<
std
::
mutex
>
;
...
...
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