gem5
|
#include <misc.hh>
Public Types | |
enum | LogLevel { PANIC = 0, FATAL, WARN, INFO, HACK, NUM_LOG_LEVELS } |
Public Member Functions | |
Logger (std::ostream &stream, const char *prefix) | |
virtual | ~Logger () |
template<typename... Args> | |
void | print (const char *func, const char *file, int line, const char *format, const Args &...args) |
template<typename... Args> | |
void | print (const char *func, const char *file, int line, const std::string &format, const Args &...args) |
Static Public Member Functions | |
static void | setLevel (LogLevel ll) |
Set the active log level. More... | |
static Logger & | get (LogLevel ll) |
Get a Logger corresponding to a specific log level. More... | |
Public Attributes | |
bool | enabled |
bool | verbose |
Protected Member Functions | |
virtual void | printEpilogue (const char *func, const char *file, int line, const char *format) |
Protected Attributes | |
std::ostream & | stream |
const char * | prefix |
enum Logger::LogLevel |
Logger::Logger | ( | std::ostream & | stream, |
const char * | prefix | ||
) |
|
inline |
Definition at line 95 of file misc.hh.
References ccprintf(), enabled, prefix, printEpilogue(), and stream.
Referenced by print().
|
inline |
|
protectedvirtual |
Reimplemented in ExitLogger.
Definition at line 96 of file misc.cc.
References ccprintf(), curTick(), newline_if_needed(), stream, and verbose.
Referenced by print(), and ExitLogger::printEpilogue().
|
static |
Set the active log level.
All levels that are lower or equal to the selected log level will be activated.
ll | Maximum log level to print |
Definition at line 70 of file misc.cc.
References ArmISA::i, and NUM_LOG_LEVELS.
Referenced by pybind_init_core().
|
protected |
Definition at line 124 of file misc.hh.
Referenced by print(), printEpilogue(), and ExitLogger::printEpilogue().
bool Logger::verbose |
Definition at line 121 of file misc.hh.
Referenced by printEpilogue().