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
bcc1918d
Commit
bcc1918d
authored
9 years ago
by
Gabi Melman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
console color example
parent
ccabe07f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
README.md
README.md
+7
-0
No files found.
README.md
View file @
bcc1918d
...
...
@@ -133,6 +133,13 @@ int main(int, char* [])
auto
syslog_logger
=
spd
::
syslog_logger
(
"syslog"
,
ident
,
LOG_PID
);
syslog_logger
->
warn
(
"This is warning that will end up in syslog. This is Linux only!"
);
#endif
//console color example
auto
console_out
=
spdlog
::
sinks
::
stderr_sink_st
::
instance
();
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_sink
->
set_color
(
spd
::
level
::
info
,
color_sink
->
bold
+
color_sink
->
green
);
color_logger
->
info
(
"Testing color logger..."
);
}
catch
(
const
spd
::
spdlog_ex
&
ex
)
{
...
...
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