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
38e5dbd8
Commit
38e5dbd8
authored
Jul 17, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix win-color sink redirection to file
parent
50ed2794
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
wincolor_sink-inl.h
include/spdlog/sinks/wincolor_sink-inl.h
+3
-3
No files found.
include/spdlog/sinks/wincolor_sink-inl.h
View file @
38e5dbd8
...
...
@@ -149,12 +149,12 @@ void SPDLOG_INLINE wincolor_sink<ConsoleMutex>::write_to_file_(const fmt::memory
DWORD
total_written
=
0
;
do
{
DWORD
bytes_written
=
0
;
bool
ok
=
WriteFile
(
out_handle_
,
formatted
.
data
()
,
size
,
&
bytes_written
,
nullptr
)
!=
0
;
DWORD
bytes_written
=
0
;
bool
ok
=
WriteFile
(
out_handle_
,
formatted
.
data
()
+
total_written
,
size
-
total_written
,
&
bytes_written
,
nullptr
)
!=
0
;
if
(
!
ok
||
bytes_written
==
0
)
{
throw
spdlog_ex
(
"wincolor_sink: write_to_file_ failed. GetLastError(): "
+
std
::
to_string
(
::
GetLastError
()));
}
}
total_written
+=
bytes_written
;
}
while
(
total_written
<
size
);
}
...
...
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