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
46f97685
Commit
46f97685
authored
Mar 09, 2018
by
fegomes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change of scope the name_to_level variable
parent
c21dd874
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
include/spdlog/common.h
include/spdlog/common.h
+9
-10
No files found.
include/spdlog/common.h
View file @
46f97685
...
...
@@ -87,16 +87,6 @@ enum level_enum
off
=
6
};
static
std
::
unordered_map
<
std
::
string
,
level_enum
>
name_to_level
=
{
{
"trace"
,
level
::
trace
},
{
"debug"
,
level
::
debug
},
{
"info"
,
level
::
info
},
{
"warning"
,
level
::
warn
},
{
"error"
,
level
::
err
},
{
"critical"
,
level
::
critical
},
{
"off"
,
level
::
off
}
};
#if !defined(SPDLOG_LEVEL_NAMES)
#define SPDLOG_LEVEL_NAMES { "trace", "debug", "info", "warning", "error", "critical", "off" }
...
...
@@ -116,6 +106,15 @@ inline const char* to_short_str(spdlog::level::level_enum l)
}
inline
spdlog
::
level
::
level_enum
to_level_enum
(
const
std
::
string
&
name
)
{
static
std
::
unordered_map
<
std
::
string
,
level_enum
>
name_to_level
=
{
{
level_names
[
0
],
level
::
trace
},
{
level_names
[
1
],
level
::
debug
},
{
level_names
[
2
],
level
::
info
},
{
level_names
[
3
],
level
::
warn
},
{
level_names
[
4
],
level
::
err
},
{
level_names
[
5
],
level
::
critical
},
{
level_names
[
6
],
level
::
off
}
};
auto
ci
=
name_to_level
.
find
(
name
);
if
(
ci
!=
name_to_level
.
end
())
{
...
...
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