20#include <sys/resource.h>
30#include <boost/preprocessor/logical/not.hpp>
31#include <boost/preprocessor/punctuation/comma_if.hpp>
32#include <boost/preprocessor/facilities/is_empty.hpp>
61 {
return LocalStream::instance().set_issue_catcher( catcher ); }
82 { LocalStream::instance().error( issue ); }
89 { LocalStream::instance().fatal( issue ); }
116 { LocalStream::instance().warning( issue ); }
119 rlimit core_limit = { RLIM_INFINITY, RLIM_INFINITY };
120 return setrlimit( RLIMIT_CORE, &core_limit );
126#define ERS_REPORT_IMPL( stream, issue, message, level ) \
128 std::ostringstream ers_report_impl_out_buffer; \
129 ers_report_impl_out_buffer << message; \
130 stream( issue( ERS_HERE, ers_report_impl_out_buffer.str() ) \
131 BOOST_PP_COMMA_IF( BOOST_PP_NOT( ERS_IS_EMPTY( ERS_EMPTY level ) ) ) level ); \
int verbosity_level() const
returns current verbosity level
static Configuration & instance()
return the singleton
int debug_level() const
returns current debug level
Implements issue catcher lifetime management.
Base class for any user define issue.
static StreamManager & instance()
return the singleton
void log(const Issue &issue)
sends an issue to the log stream
void debug(const Issue &issue, int level)
sends an Issue to the debug stream
void information(const Issue &issue)
sends an issue to the information stream
void warning(const Issue &issue)
void info(const Issue &issue)
void log(const Issue &issue)
IssueCatcherHandler * set_issue_catcher(const std::function< void(const ers::Issue &)> &catcher)
void debug(const Issue &issue, int level=debug_level())
void fatal(const Issue &issue)
Factory couldn t std::string alg_name Invalid configuration error