|
gem5
v20.1.0.5
|
Logging wrapper for ostreams with the format: <when>: <name>: <message-body> More...
#include <trace.hh>
Public Member Functions | |
| OstreamLogger (std::ostream &stream_) | |
| void | logMessage (Tick when, const std::string &name, const std::string &flag, const std::string &message) override |
| Log formatted message. More... | |
| std::ostream & | getOstream () override |
| Return an ostream that can be used to send messages to the 'same place' as formatted logMessage messages. More... | |
Public Member Functions inherited from Trace::Logger | |
| template<typename ... Args> | |
| void | dprintf (Tick when, const std::string &name, const char *fmt, const Args &...args) |
| Log a single message. More... | |
| template<typename ... Args> | |
| void | dprintf_flag (Tick when, const std::string &name, const std::string &flag, const char *fmt, const Args &...args) |
| Log a single message with a flag prefix. More... | |
| void | dump (Tick when, const std::string &name, const void *d, int len, const std::string &flag) |
| Dump a block of data of length len. More... | |
| void | setIgnore (ObjectMatch &ignore_) |
| Set objects to ignore. More... | |
| void | addIgnore (const ObjectMatch &ignore_) |
| Add objects to ignore. More... | |
| virtual | ~Logger () |
Protected Attributes | |
| std::ostream & | stream |
Protected Attributes inherited from Trace::Logger | |
| ObjectMatch | ignore |
| Name match for objects to ignore. More... | |
Logging wrapper for ostreams with the format: <when>: <name>: <message-body>
|
inline |
|
inlineoverridevirtual |
Return an ostream that can be used to send messages to the 'same place' as formatted logMessage messages.
This can be implemented to use a logger's underlying ostream, to provide an ostream which formats the output in some way, or just set to one of std::cout, std::cerr
Implements Trace::Logger.
Definition at line 113 of file trace.hh.
References stream.
|
overridevirtual |
Log formatted message.
Implements Trace::Logger.
Definition at line 147 of file trace.cc.
References ccprintf(), DTRACE, Trace::Logger::ignore, ObjectMatch::match(), MaxTick, name(), print_backtrace(), STATIC_ERR, and stream.
|
protected |
Definition at line 104 of file trace.hh.
Referenced by getOstream(), and logMessage().