Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
43710923
Commit
43710923
authored
Jun 29, 2017
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed gcc shadow warnings
parent
f06f3f14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
example/example.cpp
example/example.cpp
+1
-4
include/spdlog/sinks/ansicolor_sink.h
include/spdlog/sinks/ansicolor_sink.h
+0
-1
No files found.
example/example.cpp
View file @
43710923
...
@@ -32,10 +32,7 @@ int main(int, char*[])
...
@@ -32,10 +32,7 @@ int main(int, char*[])
console
->
error
(
"Some error message with arg{}.."
,
1
);
console
->
error
(
"Some error message with arg{}.."
,
1
);
// Conditional logging example
// Conditional logging example
auto
i
=
2
;
console
->
info_if
(
true
,
"Welcome to spdlog conditional logging!"
);
console
->
info_if
(
i
<
20
,
"Welcome to spdlog conditional logging!"
);
console
->
warn_if
(
i
!=
0
,
"an important message"
);
console
->
critical_if
(
i
!=
2
,
"a false warning which won't show up"
);
// Formatting examples
// Formatting examples
console
->
warn
(
"Easy padding in numbers like {:08d}"
,
12
);
console
->
warn
(
"Easy padding in numbers like {:08d}"
,
12
);
...
...
include/spdlog/sinks/ansicolor_sink.h
View file @
43710923
...
@@ -85,7 +85,6 @@ protected:
...
@@ -85,7 +85,6 @@ protected:
if
(
should_do_colors_
)
if
(
should_do_colors_
)
{
{
const
std
::
string
&
prefix
=
colors_
[
msg
.
level
];
const
std
::
string
&
prefix
=
colors_
[
msg
.
level
];
const
std
::
string
&
reset
=
colors_
[
level
::
off
];
fwrite
(
prefix
.
data
(),
sizeof
(
char
),
prefix
.
size
(),
target_file_
);
fwrite
(
prefix
.
data
(),
sizeof
(
char
),
prefix
.
size
(),
target_file_
);
fwrite
(
msg
.
formatted
.
data
(),
sizeof
(
char
),
msg
.
formatted
.
size
(),
target_file_
);
fwrite
(
msg
.
formatted
.
data
(),
sizeof
(
char
),
msg
.
formatted
.
size
(),
target_file_
);
fwrite
(
reset
.
data
(),
sizeof
(
char
),
reset
.
size
(),
target_file_
);
fwrite
(
reset
.
data
(),
sizeof
(
char
),
reset
.
size
(),
target_file_
);
...
...
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