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
ee22eed2
Commit
ee22eed2
authored
May 18, 2021
by
steven lunt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add macros for overriding the individual level names
parent
ab72de5f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
2 deletions
+72
-2
include/spdlog/common.h
include/spdlog/common.h
+29
-1
include/spdlog/tweakme.h
include/spdlog/tweakme.h
+43
-1
No files found.
include/spdlog/common.h
View file @
ee22eed2
...
...
@@ -152,10 +152,38 @@ enum level_enum
n_levels
};
#if !defined(SPDLOG_LEVEL_NAME_TRACE)
#define SPDLOG_LEVEL_NAME_TRACE "trace"
#endif
#if !defined(SPDLOG_LEVEL_NAME_DEBUG)
#define SPDLOG_LEVEL_NAME_DEBUG "debug"
#endif
#if !defined(SPDLOG_LEVEL_NAME_INFO)
#define SPDLOG_LEVEL_NAME_INFO "info"
#endif
#if !defined(SPDLOG_LEVEL_NAME_WARNING)
#define SPDLOG_LEVEL_NAME_WARNING "warning"
#endif
#if !defined(SPDLOG_LEVEL_NAME_ERROR)
#define SPDLOG_LEVEL_NAME_ERROR "error"
#endif
#if !defined(SPDLOG_LEVEL_NAME_CRITICAL)
#define SPDLOG_LEVEL_NAME_CRITICAL "critical"
#endif
#if !defined(SPDLOG_LEVEL_NAME_OFF)
#define SPDLOG_LEVEL_NAME_OFF "off"
#endif
#if !defined(SPDLOG_LEVEL_NAMES)
#define SPDLOG_LEVEL_NAMES \
{ \
"trace", "debug", "info", "warning", "error", "critical", "off"
\
SPDLOG_LEVEL_NAME_TRACE, SPDLOG_LEVEL_NAME_DEBUG, SPDLOG_LEVEL_NAME_INFO, SPDLOG_LEVEL_NAME_WARNING, SPDLOG_LEVEL_NAME_ERROR, SPDLOG_LEVEL_NAME_CRITICAL, SPDLOG_LEVEL_NAME_OFF
\
}
#endif
...
...
include/spdlog/tweakme.h
View file @
ee22eed2
...
...
@@ -87,12 +87,54 @@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize level names (e.g. "M
T
TRACE")
// Uncomment to customize level names (e.g. "M
Y
TRACE")
//
// #define SPDLOG_LEVEL_NAMES { "MY TRACE", "MY DEBUG", "MY INFO", "MY WARNING",
// "MY ERROR", "MY CRITICAL", "OFF" }
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the trace level name
//
// #define SPDLOG_LEVEL_NAME_TRACE "MY TRACE"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the debug level name
//
// #define SPDLOG_LEVEL_NAME_DEBUG "MY DEBUG"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the info level name
//
// #define SPDLOG_LEVEL_NAME_INFO "MY INFO"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the warning level name
//
// #define SPDLOG_LEVEL_NAME_WARNING "MY WARNING"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the error level name
//
// #define SPDLOG_LEVEL_NAME_ERROR "MY ERROR"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the critical level name
//
// #define SPDLOG_LEVEL_NAME_CRITICAL "MY CRITICAL"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the off level name
//
// #define SPDLOG_LEVEL_NAME_OFF "MY OFF"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize short level names (e.g. "MT")
// These can be longer than one character.
...
...
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