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
d405027f
Commit
d405027f
authored
Mar 30, 2016
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed setColor
parent
ddc9aa8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
example.cpp
example/example.cpp
+1
-1
ansicolor_sink.h
include/spdlog/sinks/ansicolor_sink.h
+2
-2
No files found.
example/example.cpp
View file @
d405027f
...
...
@@ -113,7 +113,7 @@ void color_example()
auto
color_sink
=
std
::
make_shared
<
spd
::
sinks
::
ansicolor_sink
>
(
console_out
);
// wraps around another sink
auto
color_logger
=
spd
::
details
::
registry
::
instance
().
create
(
"Color"
,
color_sink
);
color_logger
->
set_level
(
spd
::
level
::
trace
);
color_sink
->
set
C
olor
(
spd
::
level
::
info
,
color_sink
->
bold
+
color_sink
->
green
);
color_sink
->
set
_c
olor
(
spd
::
level
::
info
,
color_sink
->
bold
+
color_sink
->
green
);
color_logger
->
info
(
"Testing color logger..."
);
color_logger
->
trace
(
"Trace"
);
color_logger
->
debug
(
"Debug"
);
...
...
include/spdlog/sinks/ansicolor_sink.h
View file @
d405027f
...
...
@@ -30,7 +30,7 @@ public:
virtual
void
log
(
const
details
::
log_msg
&
msg
)
override
;
virtual
void
flush
()
override
;
void
set
C
olor
(
level
::
level_enum
level
,
const
std
::
string
&
color
);
void
set
_c
olor
(
level
::
level_enum
level
,
const
std
::
string
&
color
);
/// \name Formatting codes
//@{
...
...
@@ -124,7 +124,7 @@ inline void ansicolor_sink::flush()
sink_
->
flush
();
}
inline
void
ansicolor_sink
::
set
C
olor
(
level
::
level_enum
level
,
const
std
::
string
&
color
)
inline
void
ansicolor_sink
::
set
_c
olor
(
level
::
level_enum
level
,
const
std
::
string
&
color
)
{
colors_
[
level
]
=
color
;
}
...
...
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