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
Feb 08, 2018
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
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:
...
@@ -50,6 +50,13 @@ public:
wincolor_sink
(
const
wincolor_sink
&
other
)
=
delete
;
wincolor_sink
(
const
wincolor_sink
&
other
)
=
delete
;
wincolor_sink
&
operator
=
(
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
:
protected
:
virtual
void
_sink_it
(
const
details
::
log_msg
&
msg
)
override
virtual
void
_sink_it
(
const
details
::
log_msg
&
msg
)
override
{
{
...
@@ -64,13 +71,6 @@ protected:
...
@@ -64,13 +71,6 @@ protected:
// windows console always flushed?
// 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
:
private
:
HANDLE
out_handle_
;
HANDLE
out_handle_
;
std
::
unordered_map
<
level
::
level_enum
,
WORD
,
level
::
level_hasher
>
colors_
;
std
::
unordered_map
<
level
::
level_enum
,
WORD
,
level
::
level_hasher
>
colors_
;
...
...
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