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
f8aec1bd
Commit
f8aec1bd
authored
Feb 03, 2018
by
gabime
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/gabime/spdlog.git
parents
51a83da5
c3364703
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
example.cpp
example/example.cpp
+2
-2
ansicolor_sink.h
include/spdlog/sinks/ansicolor_sink.h
+5
-3
No files found.
example/example.cpp
View file @
f8aec1bd
...
...
@@ -64,9 +64,9 @@ int main(int, char*[])
// Runtime log levels
spd
::
set_level
(
spd
::
level
::
info
);
//Set global log level to info
console
->
debug
(
"This message shold not be displayed!"
);
console
->
debug
(
"This message sho
u
ld not be displayed!"
);
console
->
set_level
(
spd
::
level
::
debug
);
// Set specific logger's log level
console
->
debug
(
"This message shold be displayed.."
);
console
->
debug
(
"This message sho
u
ld be displayed.."
);
// Compile time log levels
// define SPDLOG_DEBUG_ON or SPDLOG_TRACE_ON
...
...
include/spdlog/sinks/ansicolor_sink.h
View file @
f8aec1bd
...
...
@@ -49,16 +49,17 @@ public:
}
/// Formatting codes
const
std
::
string
reset
=
"
\033
[
00
m"
;
const
std
::
string
reset
=
"
\033
[m"
;
const
std
::
string
bold
=
"
\033
[1m"
;
const
std
::
string
dark
=
"
\033
[2m"
;
const
std
::
string
underline
=
"
\033
[4m"
;
const
std
::
string
blink
=
"
\033
[5m"
;
const
std
::
string
reverse
=
"
\033
[7m"
;
const
std
::
string
concealed
=
"
\033
[8m"
;
const
std
::
string
clear_line
=
"
\033
[K"
;
// Foreground colors
const
std
::
string
grey
=
"
\033
[30m"
;
const
std
::
string
black
=
"
\033
[30m"
;
const
std
::
string
red
=
"
\033
[31m"
;
const
std
::
string
green
=
"
\033
[32m"
;
const
std
::
string
yellow
=
"
\033
[33m"
;
...
...
@@ -68,7 +69,7 @@ public:
const
std
::
string
white
=
"
\033
[37m"
;
/// Background colors
const
std
::
string
on_
grey
=
"
\033
[40m"
;
const
std
::
string
on_
black
=
"
\033
[40m"
;
const
std
::
string
on_red
=
"
\033
[41m"
;
const
std
::
string
on_green
=
"
\033
[42m"
;
const
std
::
string
on_yellow
=
"
\033
[43m"
;
...
...
@@ -88,6 +89,7 @@ protected:
fwrite
(
prefix
.
data
(),
sizeof
(
char
),
prefix
.
size
(),
target_file_
);
fwrite
(
msg
.
formatted
.
data
(),
sizeof
(
char
),
msg
.
formatted
.
size
(),
target_file_
);
fwrite
(
reset
.
data
(),
sizeof
(
char
),
reset
.
size
(),
target_file_
);
fwrite
(
clear_line
.
data
(),
sizeof
(
char
),
clear_line
.
size
(),
target_file_
);
}
else
{
...
...
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