9 #ifndef CYCLUS_SRC_LOGGER_H_ 10 #define CYCLUS_SRC_LOGGER_H_ 35 #define LOG(level, prefix) \ 36 if ((level > cyclus::Logger::ReportLevel()) | cyclus::Logger::NoAgent()) ; \ 37 else cyclus::Logger().Get(level, prefix) 40 if (level > cyclus::Logger::ReportLevel()) ; \ 41 else cyclus::Logger().Get(level, "core") 44 if ((level > cyclus::Logger::ReportLevel()) | cyclus::Logger::NoMem()) ; \ 45 else cyclus::Logger().Get(level, "memory") 131 std::ostringstream
os;
143 static bool no_agent;
149 static std::vector<std::string> level_to_string;
152 static std::map<std::string, LogLevel> string_to_level;
156 static void Initialize();
163 static int spc_per_lev_;
169 static int field_width_;
174 #endif // CYCLUS_SRC_LOGGER_H_ Information helpful for simulation users and developers alike.
static std::string ToString(LogLevel level)
Converts a LogLevel enum value into a corrsponding string.
static bool & NoMem()
Set whether or not agent/agent log entries should be printed.
static LogLevel ToLogLevel(std::string text)
Converts a string into a corresponding LogLevel value.
static void SetNoMem(bool nm)
Sets whether or not agent/agent log entries should be printed.
static LogLevel & ReportLevel()
Use to get/set the (global) log level report cutoff.
debugging information - most verbose
Information helpful for simulation users and developers alike - least verbose.
static void SetNoAgent(bool na)
Sets whether or not agent/agent log entries should be printed.
A logging tool providing finer grained control over standard output for debugging and other purposes...
static void SetReportLevel(LogLevel level)
Sets the report level.
Use to report questionable simulation state (use extremely sparingly)
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or.org/Osi/browser/trunk.
debugging information - least verbose
static bool & NoAgent()
Set whether or not agent/agent log entries should be printed.
Information helpful for simulation users and developers alike.
std::ostringstream & Get(LogLevel level, std::string prefix)
Returns a string stream by reference that is flushed to stdout by the Logger class destructor...
Information helpful for simulation users and developers alike.
Information helpful for simulation users and developers alike - most verbose.
Use for errors that require agent code or input file modification (use extremely sparingly) ...
LogLevel
categorical (verbosity) levels for log statements.