#include "common.hpp"
#include <boost/log/common.hpp>
#include <boost/log/sources/logger.hpp>
#include "core/logger-factory.hpp"
Go to the source code of this file.
|
| nfd |
| Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents, Colorado State University, University Pierre & Marie Curie, Sorbonne University, Washington University in St.
|
|
|
#define | NFD_LOG_INIT(name) static ::nfd::Logger& g_logger = ::nfd::LoggerFactory::create(name) |
|
#define | NFD_LOG_INCLASS_DECLARE() static ::nfd::Logger& g_logger |
|
#define | NFD_LOG_INCLASS_DEFINE(cls, name) ::nfd::Logger& cls::g_logger = ::nfd::LoggerFactory::create(name) |
|
#define | NFD_LOG_INCLASS_TEMPLATE_DEFINE(cls, name) |
|
#define | NFD_LOG_INCLASS_TEMPLATE_SPECIALIZATION_DEFINE(cls, specialization, name) |
|
#define | NFD_LOG_INCLASS_2TEMPLATE_SPECIALIZATION_DEFINE(cls, s1, s2, name) |
|
#define | NFD_BOOST_LOG(x) BOOST_LOG(x) |
|
#define | NFD_LOG_LINE(msg, expression) ::nfd::LoggerTimestamp{} << " "#msg": " << "[" << g_logger << "] " << expression |
|
#define | NFD_LOG(level, msg, expression) |
|
#define | NFD_LOG_TRACE(expression) NFD_LOG(TRACE, TRACE, expression) |
|
#define | NFD_LOG_DEBUG(expression) NFD_LOG(DEBUG, DEBUG, expression) |
|
#define | NFD_LOG_INFO(expression) NFD_LOG(INFO, INFO, expression) |
|
#define | NFD_LOG_WARN(expression) NFD_LOG(WARN, WARNING, expression) |
|
#define | NFD_LOG_ERROR(expression) NFD_LOG(ERROR, ERROR, expression) |
|
#define | NFD_LOG_FATAL(expression) NFD_LOG(FATAL, FATAL, expression) |
|
#define NFD_BOOST_LOG |
( |
|
x | ) |
BOOST_LOG(x) |
#define NFD_LOG |
( |
|
level, |
|
|
|
msg, |
|
|
|
expression |
|
) |
| |
Value:do { \
if (g_logger.isEnabled(::nfd::LOG_##level)) { \
NFD_BOOST_LOG(g_logger.boostLogger) <<
NFD_LOG_LINE(msg, expression); \
} \
} while (false)
#define NFD_LOG_LINE(msg, expression)
Definition at line 153 of file logger.hpp.
#define NFD_LOG_DEBUG |
( |
|
expression | ) |
NFD_LOG(DEBUG, DEBUG, expression) |
#define NFD_LOG_ERROR |
( |
|
expression | ) |
NFD_LOG(ERROR, ERROR, expression) |
#define NFD_LOG_FATAL |
( |
|
expression | ) |
NFD_LOG(FATAL, FATAL, expression) |
#define NFD_LOG_INCLASS_2TEMPLATE_SPECIALIZATION_DEFINE |
( |
|
cls, |
|
|
|
s1, |
|
|
|
s2, |
|
|
|
name |
|
) |
| |
Value:template<> \
static Logger & create(const std::string &moduleName)
provides logging for a module
Definition at line 139 of file logger.hpp.
#define NFD_LOG_INCLASS_DECLARE |
( |
| ) |
static ::nfd::Logger& g_logger |
#define NFD_LOG_INCLASS_TEMPLATE_DEFINE |
( |
|
cls, |
|
|
|
name |
|
) |
| |
Value:template<class T> \
static Logger & create(const std::string &moduleName)
provides logging for a module
Definition at line 131 of file logger.hpp.
#define NFD_LOG_INCLASS_TEMPLATE_SPECIALIZATION_DEFINE |
( |
|
cls, |
|
|
|
specialization, |
|
|
|
name |
|
) |
| |
Value:template<> \
static Logger & create(const std::string &moduleName)
provides logging for a module
Definition at line 135 of file logger.hpp.
#define NFD_LOG_INFO |
( |
|
expression | ) |
NFD_LOG(INFO, INFO, expression) |
#define NFD_LOG_LINE |
( |
|
msg, |
|
|
|
expression |
|
) |
| ::nfd::LoggerTimestamp{} << " "#msg": " << "[" << g_logger << "] " << expression |
#define NFD_LOG_TRACE |
( |
|
expression | ) |
NFD_LOG(TRACE, TRACE, expression) |
#define NFD_LOG_WARN |
( |
|
expression | ) |
NFD_LOG(WARN, WARNING, expression) |