CatapultServer  v0.5.0.1 (Elephant)
Logging.h File Reference
Include dependency graph for Logging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  catapult::utils::LogFilter
 Filter used for filtering logs by level and/or component. More...
 
struct  catapult::utils::BasicLoggerOptions
 Basic logger options. More...
 
struct  catapult::utils::FileLoggerOptions
 File logger options. More...
 
class  catapult::utils::LoggingBootstrapper
 Bootstraps boost logging. More...
 
class  catapult::utils::log::EraseOnExit< TAttributes >
 Removes an item from an attributes collection on destruction. More...
 
class  catapult::utils::log::custom_info_tagger_feature< TBase, TTraits >
 A custom logging feature that allows tagging a log record with custom information. More...
 
struct  catapult::utils::log::custom_info_tagger< TCustomFeatureTraits >
 Allows custom_info_tagger_feature to be used as a source feature. More...
 
struct  catapult::utils::log::custom_info_tagger< TCustomFeatureTraits >::apply< TBase >
 
struct  catapult::utils::log::LineNumberTraits
 Traits for attaching a line number to a log record. More...
 
struct  catapult::utils::log::FilenameTraits
 Traits for attaching a filename to a log record. More...
 
struct  catapult::utils::log::SubcomponentTraits
 Traits for attaching a subcomponent tag to a log record. More...
 
class  catapult::utils::log::catapult_logger
 Catapult logger type. More...
 

Namespaces

 catapult
 
 catapult::utils
 
 catapult::utils::log
 
 catapult::utils::log::keywords
 Custom keywords that are used in associative arguments.
 

Macros

#define CATAPULT_LOG_WITH_LOGGER_LEVEL_TAG(LOGGER, LEVEL, TAG)
 
#define CATAPULT_LOG_WITH_LOGGER_LEVEL(LOGGER, LEVEL)   CATAPULT_LOG_WITH_LOGGER_LEVEL_TAG(LOGGER, LEVEL, (::catapult::utils::ExtractDirectoryName(__FILE__)))
 Writes a log entry to LOGGER with LEVEL severity. More...
 
#define CATAPULT_LOG_LEVEL(LEVEL)   CATAPULT_LOG_WITH_LOGGER_LEVEL(::catapult::utils::log::global_logger::get(), LEVEL)
 Writes a log entry to the default logger with LEVEL severity. More...
 
#define CATAPULT_LOG(SEV)
 Writes a log entry to the default logger with SEV severity. More...
 

Enumerations

enum  catapult::utils::LogLevel {
  catapult::utils::LogLevel::Trace = boost::log::trivial::trace, catapult::utils::LogLevel::Debug = boost::log::trivial::debug, catapult::utils::LogLevel::Info = boost::log::trivial::info, catapult::utils::LogLevel::Warning = boost::log::trivial::warning,
  catapult::utils::LogLevel::Error = boost::log::trivial::error, catapult::utils::LogLevel::Fatal = boost::log::trivial::fatal, catapult::utils::LogLevel::Min = Trace, catapult::utils::LogLevel::Max = Fatal
}
 Catapult log levels. More...
 
enum  catapult::utils::LogSinkType { catapult::utils::LogSinkType::Sync, catapult::utils::LogSinkType::Async }
 Catapult log sink types. More...
 
enum  catapult::utils::LogColorMode { catapult::utils::LogColorMode::Ansi, catapult::utils::LogColorMode::AnsiBold, catapult::utils::LogColorMode::None }
 Catapult (console) log color modes. More...
 

Functions

void catapult::utils::CatapultLogFlush ()
 

Macro Definition Documentation

◆ CATAPULT_LOG

#define CATAPULT_LOG (   SEV)
Value:
::catapult::utils::log::global_logger::get(), \
(static_cast<::catapult::utils::LogLevel>(boost::log::trivial::SEV)))

Writes a log entry to the default logger with SEV severity.

◆ CATAPULT_LOG_LEVEL

#define CATAPULT_LOG_LEVEL (   LEVEL)    CATAPULT_LOG_WITH_LOGGER_LEVEL(::catapult::utils::log::global_logger::get(), LEVEL)

Writes a log entry to the default logger with LEVEL severity.

◆ CATAPULT_LOG_WITH_LOGGER_LEVEL

#define CATAPULT_LOG_WITH_LOGGER_LEVEL (   LOGGER,
  LEVEL 
)    CATAPULT_LOG_WITH_LOGGER_LEVEL_TAG(LOGGER, LEVEL, (::catapult::utils::ExtractDirectoryName(__FILE__)))

Writes a log entry to LOGGER with LEVEL severity.

◆ CATAPULT_LOG_WITH_LOGGER_LEVEL_TAG

#define CATAPULT_LOG_WITH_LOGGER_LEVEL_TAG (   LOGGER,
  LEVEL,
  TAG 
)
Value:
BOOST_LOG_STREAM_WITH_PARAMS( \
(LOGGER), \
(::catapult::utils::log::keywords::file = (::catapult::utils::ExtractFilename(__FILE__))) \
(::catapult::utils::log::keywords::line = (static_cast<unsigned int>(__LINE__))) \
(::catapult::utils::log::keywords::subcomponent = (TAG)) \
(::boost::log::keywords::severity = (static_cast<boost::log::trivial::severity_level>(LEVEL))))
CATAPULT_LOG_WITH_LOGGER_LEVEL
#define CATAPULT_LOG_WITH_LOGGER_LEVEL(LOGGER, LEVEL)
Writes a log entry to LOGGER with LEVEL severity.
Definition: Logging.h:332
catapult::utils::ExtractFilename
constexpr const char * ExtractFilename(const char *fullPath)
Definition: PathUtils.h:44