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
05b2aabe
Commit
05b2aabe
authored
7 years ago
by
Benjamin Schindler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make set_color public in wincolor_sink to retain configurability
parent
5ab033fb
master
v1.5.0
v1.4.2
v1.4.1
v1.4.0
v1.3.1
v1.3.0
v1.2.1
v1.2.0
v1.1.0
v1.0.0
v0.17.0
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
wincolor_sink.h
include/spdlog/sinks/wincolor_sink.h
+7
-7
No files found.
include/spdlog/sinks/wincolor_sink.h
View file @
05b2aabe
...
...
@@ -50,6 +50,13 @@ public:
wincolor_sink
(
const
wincolor_sink
&
other
)
=
delete
;
wincolor_sink
&
operator
=
(
const
wincolor_sink
&
other
)
=
delete
;
// change the color for the given level
void
set_color
(
level
::
level_enum
level
,
WORD
color
)
{
std
::
lock_guard
<
Mutex
>
lock
(
base_sink
<
Mutex
>::
_mutex
);
colors_
[
level
]
=
color
;
}
protected
:
virtual
void
_sink_it
(
const
details
::
log_msg
&
msg
)
override
{
...
...
@@ -64,13 +71,6 @@ protected:
// windows console always flushed?
}
// change the color for the given level
void
set_color
(
level
::
level_enum
level
,
WORD
color
)
{
std
::
lock_guard
<
Mutex
>
lock
(
base_sink
<
Mutex
>::
_mutex
);
colors_
[
level
]
=
color
;
}
private
:
HANDLE
out_handle_
;
std
::
unordered_map
<
level
::
level_enum
,
WORD
,
level
::
level_hasher
>
colors_
;
...
...
This diff is collapsed.
Click to expand it.
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