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
0ccbdcdd
Commit
0ccbdcdd
authored
Feb 18, 2019
by
Mattias Fornander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tweak support for user short level names
parent
c598b2fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
common.h
include/spdlog/common.h
+5
-2
tweakme.h
include/spdlog/tweakme.h
+8
-2
No files found.
include/spdlog/common.h
View file @
0ccbdcdd
...
...
@@ -125,9 +125,12 @@ enum level_enum
"trace", "debug", "info", "warning", "error", "critical", "off" \
}
#endif
static
string_view_t
level_string_views
[]
SPDLOG_LEVEL_NAMES
;
static
const
char
*
short_level_names
[]{
"T"
,
"D"
,
"I"
,
"W"
,
"E"
,
"C"
,
"O"
};
#if !defined(SPDLOG_SHORT_LEVEL_NAMES)
#define SPDLOG_SHORT_LEVEL_NAMES {"T", "D", "I", "W", "E", "C", "O"}
#endif
static
const
char
*
short_level_names
[]
SPDLOG_SHORT_LEVEL_NAMES
;
inline
string_view_t
&
to_string_view
(
spdlog
::
level
::
level_enum
l
)
SPDLOG_NOEXCEPT
{
...
...
include/spdlog/tweakme.h
View file @
0ccbdcdd
...
...
@@ -121,6 +121,13 @@
// "MY ERROR", "MY CRITICAL", "OFF" }
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize short level names (e.g. "MT")
// These can be longer than one character.
//
// #define SPDLOG_SHORT_LEVEL_NAMES { "T", "D", "I", "W", "E", "C", "O" }
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to disable default logger creation.
// This might save some (very) small initialization time if no default logger is needed.
...
...
@@ -142,4 +149,4 @@
// Defaults to __FUNCTION__ (should work on all compilers) if not defined.
//
// #define SPDLOG_FUNCTION __PRETTY_FUNCTION__
///////////////////////////////////////////////////////////////////////////////
\ No newline at end of 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