|
gem5
v22.1.0.0
|
#include <logging.hh>
Classes | |
| struct | Loc |
Public Types | |
| enum | LogLevel { PANIC , FATAL , WARN , INFO , HACK , NUM_LOG_LEVELS } |
Public Member Functions | |
| Logger (const char *prefix) | |
| virtual | ~Logger () |
| template<typename ... Args> | |
| void | print (const Loc &loc, const char *format, const Args &...args) |
| template<typename ... Args> | |
| void | print (const Loc &loc, const std::string &format, const Args &...args) |
| void | exit_helper () |
| This helper is necessary since noreturn isn't inherited by virtual functions, and gcc will get mad if a function calls panic and then doesn't return. More... | |
Static Public Member Functions | |
| static Logger & | getPanic () |
| Get a Logger for the specified type of message. More... | |
| static Logger & | getFatal () |
| static Logger & | getWarn () |
| static Logger & | getInfo () |
| static Logger & | getHack () |
| static void | setLevel (LogLevel ll) |
Protected Member Functions | |
| virtual void | log (const Loc &loc, std::string s) |
| Generates the log message. More... | |
| virtual void | exit () |
Protected Attributes | |
| bool | enabled |
| const char * | prefix |
Definition at line 55 of file logging.hh.
| Enumerator | |
|---|---|
| PANIC | |
| FATAL | |
| WARN | |
| INFO | |
| HACK | |
| NUM_LOG_LEVELS | |
Definition at line 68 of file logging.hh.
|
inline |
Definition at line 91 of file logging.hh.
References prefix.
|
inlinevirtual |
Definition at line 96 of file logging.hh.
|
inlineprotectedvirtual |
Definition at line 137 of file logging.hh.
Referenced by exit_helper().
|
inline |
This helper is necessary since noreturn isn't inherited by virtual functions, and gcc will get mad if a function calls panic and then doesn't return.
Definition at line 125 of file logging.hh.
References exit().
|
static |
Definition at line 92 of file logging_mock.cc.
Referenced by setLevel(), TEST(), and TEST_F().
|
static |
Definition at line 110 of file logging_mock.cc.
Referenced by setLevel(), TEST(), and TEST_F().
|
static |
Definition at line 104 of file logging_mock.cc.
Referenced by setLevel(), TEST(), and TEST_F().
|
static |
Get a Logger for the specified type of message.
Definition at line 86 of file logging_mock.cc.
Referenced by setLevel(), TEST(), and TEST_F().
|
static |
Definition at line 98 of file logging_mock.cc.
Referenced by setLevel(), TEST(), and TEST_F().
|
inlineprotectedvirtual |
Generates the log message.
By default it is sent to cerr.
Definition at line 132 of file logging.hh.
References gem5::Logger::Loc::file, gem5::Logger::Loc::line, and gem5::VegaISA::s.
Referenced by print().
|
inline |
Definition at line 99 of file logging.hh.
References gem5::ccprintf(), enabled, gem5::ArmISA::format, log(), prefix, and ss.
|
inline |
Definition at line 115 of file logging.hh.
References gem5::ArmISA::format, and print().
|
inlinestatic |
Definition at line 75 of file logging.hh.
References enabled, FATAL, getFatal(), getHack(), getInfo(), getPanic(), getWarn(), HACK, INFO, PANIC, and WARN.
Referenced by gem5::pybind_init_core(), and TEST_F().
|
protected |
Definition at line 128 of file logging.hh.
Referenced by print(), and setLevel().
|
protected |
Definition at line 139 of file logging.hh.