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
e5032c8d
Commit
e5032c8d
authored
Jul 14, 2016
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed SPDLOG_TRACE under gcc (isue #241)
parent
2e1b46bf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
include/spdlog/common.h
include/spdlog/common.h
+0
-3
include/spdlog/spdlog.h
include/spdlog/spdlog.h
+8
-5
No files found.
include/spdlog/common.h
View file @
e5032c8d
...
@@ -122,7 +122,4 @@ using filename_t = std::wstring;
...
@@ -122,7 +122,4 @@ using filename_t = std::wstring;
using
filename_t
=
std
::
string
;
using
filename_t
=
std
::
string
;
#endif
#endif
#define SDLOG_STR_HELPER(x) #x
#define SPDLOG_STR(x) SDLOG_STR_HELPER(x)
}
//spdlog
}
//spdlog
include/spdlog/spdlog.h
View file @
e5032c8d
...
@@ -125,18 +125,21 @@ void drop_all();
...
@@ -125,18 +125,21 @@ void drop_all();
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
//
// Macros to be display source file & line
// Trace & Debug can be switched on/off at compile time for zero cost debug statements.
// Trace & Debug can be switched on/off at compile time for zero cost debug statements.
// Uncomment SPDLOG_DEBUG_ON/SPDLOG_TRACE_ON in teakme.h to enable.
// Uncomment SPDLOG_DEBUG_ON/SPDLOG_TRACE_ON in teakme.h to enable.
// SPDLOG_TRACE(..) will also print current file and line.
//
//
// Example:
// Example:
// spdlog::set_level(spdlog::level::debug);
// spdlog::set_level(spdlog::level::trace);
// SPDLOG_DEBUG(my_logger, "Some debug message {} {}", 1, 3.2);
// SPDLOG_TRACE(my_logger, "some trace message");
// SPDLOG_TRACE(my_logger, "another trace message {} {}", 1, 2);
// SPDLOG_DEBUG(my_logger, "some debug message {} {}", 3, 4);
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#ifdef SPDLOG_TRACE_ON
#ifdef SPDLOG_TRACE_ON
#define SPDLOG_TRACE(logger, ...) logger->trace(__FILE__ ## " line " ## SPDLOG_STR(__LINE__) ## ": " ## __VA_ARGS__);
#define SPDLOG_STR_H(x) #x
#define SPDLOG_STR_HELPER(x) SPDLOG_STR_H(x)
#define SPDLOG_TRACE(logger, ...) logger->trace("[" __FILE__ " line #" SPDLOG_STR_HELPER(__LINE__) "] " __VA_ARGS__)
#else
#else
#define SPDLOG_TRACE(logger, ...)
#define SPDLOG_TRACE(logger, ...)
#endif
#endif
...
...
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