JayBeams  0.1
Another project to have fun coding.
Classes | Namespaces | Macros | Functions
log.hpp File Reference
#include <jb/config_object.hpp>
#include <jb/convert_severity_level.hpp>
#include <boost/log/sources/global_logger_storage.hpp>
#include <boost/log/sources/record_ostream.hpp>
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/utility/manipulators/add_value.hpp>

Go to the source code of this file.

Classes

class  jb::log::config
 Configuration object for the logging functions. More...
 

Namespaces

 jb
 The top-level namespace for the JayBeams library.
 
 jb::log
 Logging functions and objects for JayBeams.
 

Macros

#define JB_MIN_LOG_LEVEL   debug
 
#define JB_LOG_I(logger, lvl, rec_var)
 
#define JB_LOG(lvl)
 
#define JB_LOG_VAR(lvl)
 

Functions

constexpr bool jb::severity_static_predicate (jb::severity_level lvl)
 Statically check if the severity level should even be compiled in. More...
 
void jb::log::init (config const &cfg=config())
 Initialize the logging functions using the configuration provided. More...
 
 jb::log::BOOST_LOG_INLINE_GLOBAL_LOGGER_DEFAULT (logger, boost::log::sources::severity_logger_mt< severity_level >) void next_tid()
 Define the global logger for JayBeams. More...
 

Macro Definition Documentation

◆ JB_LOG

#define JB_LOG (   lvl)

◆ JB_LOG_I

#define JB_LOG_I (   logger,
  lvl,
  rec_var 
)
Value:
} else \
for (::boost::log::record rec_var = \
(logger).open_record(boost::log::keywords::severity = lvl); \
!!rec_var;) \
::boost::log::aux::make_record_pump((logger), rec_var).stream() \
<< boost::log::add_value("Filename", __FILE__) \
<< boost::log::add_value("Lineno", static_cast<int>(__LINE__))
constexpr bool severity_static_predicate(jb::severity_level lvl)
Statically check if the severity level should even be compiled in.
Definition: log.hpp:19

Definition at line 60 of file log.hpp.

◆ JB_LOG_VAR

#define JB_LOG_VAR (   lvl)
Value:
::jb::log::logger::get(), lvl, \
BOOST_LOG_UNIQUE_IDENTIFIER_NAME(jb_log_record_))
#define JB_LOG_I(logger, lvl, rec_var)
Definition: log.hpp:60

Definition at line 75 of file log.hpp.

◆ JB_MIN_LOG_LEVEL

#define JB_MIN_LOG_LEVEL   debug

Definition at line 13 of file log.hpp.

Referenced by jb::severity_static_predicate().