14 #ifndef __OPT0FINDERLOGGER_H__
15 #define __OPT0FINDERLOGGER_H__
22 namespace flashmatch {
55 static std::map<std::string,flashmatch::logger> *
_logger_m;
99 for(
auto& name_logger : *
_logger_m) name_logger.second.set(l);
114 const std::string&
function )
const;
117 const std::string&
function,
118 const unsigned int line_num )
const;
121 const std::string&
function,
122 const unsigned int line_num,
131 #define FLASH_DEBUG() if( logger().debug () ) logger().send(::flashmatch::msg::kDEBUG, __FUNCTION__, __LINE__, __FILE__)
133 #define FLASH_INFO() if( logger().info () ) logger().send(::flashmatch::msg::kINFO, __FUNCTION__, __LINE__ )
135 #define FLASH_NORMAL() if( logger().normal () ) logger().send(::flashmatch::msg::kNORMAL, __FUNCTION__ )
137 #define FLASH_WARNING() if( logger().warning () ) logger().send(::flashmatch::msg::kWARNING, __FUNCTION__ )
139 #define FLASH_ERROR() if( logger().error () ) logger().send(::flashmatch::msg::kERROR, __FUNCTION__, __LINE__ )
141 #define FLASH_CRITICAL() logger().send(::flashmatch::msg::kCRITICAL, __FUNCTION__, __LINE__, __FILE__)
static msg::Level_t default_level()
Default logger level getter.
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
msg::Level_t level() const
Verbosity level getter.
static void default_level(msg::Level_t l)
Default logger level setter (only affect future loggers)
logger(const std::string &name="no_name")
Default constructor.
std::ostream * _ostrm
ostream
static void force_level(msg::Level_t l)
Force all loggers to change level.
virtual ~logger()
Default destructor.
std::ostream & send(const msg::Level_t) const
Formatted message (simplest)
msg::Level_t _level
Level.
Utility class used to show formatted message on the screen. A logger class for flashmatch. Simply shows a formatted colored message on a screen. A static getter method is provided to create a sharable logger instance (see OpT0FinderBase for useage). .
const std::string & name() const
Logger's name.
then echo fcl sbnd_project sbnd_project sbnd_project sbnd_project production production file_name
static std::map< std::string, flashmatch::logger > * _logger_m
Set of loggers.
Level_t
Verbosity message level.
bool operator<(const logger &rhs) const
Comparison operator for static collection of loggers.
static msg::Level_t _level_default
Default logger level.
void set(const msg::Level_t level)
Verbosity level setter.
BEGIN_PROLOG could also be cout