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
9fc0ab31
Commit
9fc0ab31
authored
Mar 26, 2015
by
Gabi Melman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update spdlog.h
Update comments about macros
parent
d39b495e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
include/spdlog/spdlog.h
include/spdlog/spdlog.h
+11
-13
No files found.
include/spdlog/spdlog.h
View file @
9fc0ab31
...
@@ -118,20 +118,24 @@ std::shared_ptr<logger> create(const std::string& logger_name, const It& sinks_b
...
@@ -118,20 +118,24 @@ std::shared_ptr<logger> create(const std::string& logger_name, const It& sinks_b
template
<
typename
Sink
,
typename
...
Args
>
template
<
typename
Sink
,
typename
...
Args
>
std
::
shared_ptr
<
spdlog
::
logger
>
create
(
const
std
::
string
&
logger_name
,
const
Args
&
...);
std
::
shared_ptr
<
spdlog
::
logger
>
create
(
const
std
::
string
&
logger_name
,
const
Args
&
...);
// Drop the reference to the given logger
void
drop
(
const
std
::
string
&
name
);
// Drop all references
void
drop_all
();
//
//
//
//
// Macros to be display source file & line
// 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.
//
//
// Example:
// Example:
//
// Enable debug macro, must be defined before including spdlog.h
// #define SPDLOG_DEBUG_ON
// #define SPDLOG_DEBUG_ON
// include "spdlog/spdlog.h"
// include "spdlog/spdlog.h"
// SPDLOG_DEBUG(my_logger, "Some debug message {} {}", 1, 3.2);
// SPDLOG_DEBUG(my_logger, "Some debug message {} {}", 1, 3.2);
//
//
#ifdef SPDLOG_TRACE_ON
#ifdef SPDLOG_TRACE_ON
#define SPDLOG_TRACE(logger, ...) logger->trace(__VA_ARGS__) << " (" << __FILE__ << " #" << __LINE__ <<")";
#define SPDLOG_TRACE(logger, ...) logger->trace(__VA_ARGS__) << " (" << __FILE__ << " #" << __LINE__ <<")";
#else
#else
...
@@ -152,12 +156,6 @@ std::shared_ptr<spdlog::logger> create(const std::string& logger_name, const Arg
...
@@ -152,12 +156,6 @@ std::shared_ptr<spdlog::logger> create(const std::string& logger_name, const Arg
#define SPDLOG_ALERT(logger, ...) logger->alert(__VA_ARGS__) << " (" << __FILE__ << " #" << __LINE__ <<")";
#define SPDLOG_ALERT(logger, ...) logger->alert(__VA_ARGS__) << " (" << __FILE__ << " #" << __LINE__ <<")";
#define SPDLOG_EMERG(logger, ...) logger->emerg(__VA_ARGS__) << " (" << __FILE__ << " #" << __LINE__ <<")";
#define SPDLOG_EMERG(logger, ...) logger->emerg(__VA_ARGS__) << " (" << __FILE__ << " #" << __LINE__ <<")";
// Drop the reference to the given logger
void
drop
(
const
std
::
string
&
name
);
// Drop all references
void
drop_all
();
}
}
...
...
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