The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::log Namespace Reference

Diagnostic logging framework. This node generates logging messages of a specific category. More...

Classes

class  BasicFormatter
 Formatter including only a few bits of the most relevant message information. More...
 
class  categories
 
class  DefaultFormatter
 Formatter that writes most message information, but excludes thread/sequence. More...
 
class  Destination
 Generic Logging destination stream interface which writes sparta::log::Message structures to some output [file]stream. Subclasses will implement stream I/O based on construction arguments. More...
 
class  DestinationInstance
 A destination where log messages go to be written to a file or other ostream. Attempts to prevent duplicate messages from being written to the same output even if logged through mutliple taps. More...
 
class  DestinationInstance< std::ostream >
 Logging Destination for an already-open ostream. More...
 
class  DestinationInstance< std::string >
 Destination that opens and writes to a file with a format based on the file extension of the filename given during construction. More...
 
class  DestinationManager
 Manages a set of destinations representing files or streams. All log messages will be written to at least one destination in this object. More...
 
class  Formatter
 File writer formatting interface. Subclsases can format for different file types (e.g. raw log, html, sql, etc.) More...
 
struct  Message
 Contains a logging message header and content. More...
 
struct  MessageInfo
 Logging Message information excluding actual message content. More...
 
class  MessageSource
 Message source object associated with a sparta TreeNode through which messages can be sent. More...
 
class  RawFormatter
 Formatter including no meta-data from the message. More...
 
class  Tap
 Logging Tap. Attach to a TreeNode to intercept logging messages from any NotificationSource nodes in the subtree of that node (including the node itself). More...
 
struct  TapAddedEvent
 
class  TapDescriptor
 Describes a tap. More...
 
struct  TapRemovedEvent
 
class  VerboseFormatter
 Formatter that writes all message information. More...
 

Typedefs

typedef uint32_t thread_id_type
 Identifies a thread in the simulator kernel.
 
typedef uint64_t sim_time_type
 Simulator timestamp type.
 
typedef int64_t seq_num_type
 Sequence number of a message within a thread ID. Signed so that initial state can be -1.
 
typedef std::vector< TapDescriptorTapDescVec
 

Functions

std::ostream & operator<< (std::ostream &o, const MessageInfo &info)
 ostream insertion operator for serializing MessageInfo.
 
std::vector< const log::TapDescriptor * > getUnusedTaps (const log::TapDescVec &taps)
 Finds all unused taps in the given tap descriptor vector.
 

Variables

static constexpr const char * INFO_DELIMITER = " "
 

Detailed Description

Diagnostic logging framework. This node generates logging messages of a specific category.

Typedef Documentation

◆ seq_num_type

typedef int64_t sparta::log::seq_num_type

Sequence number of a message within a thread ID. Signed so that initial state can be -1.

Definition at line 25 of file MessageInfo.hpp.

◆ sim_time_type

typedef uint64_t sparta::log::sim_time_type

Simulator timestamp type.

Definition at line 23 of file MessageInfo.hpp.

◆ TapDescVec

typedef std::vector<TapDescriptor> sparta::log::TapDescVec

Definition at line 324 of file Tap.hpp.

◆ thread_id_type

typedef uint32_t sparta::log::thread_id_type

Identifies a thread in the simulator kernel.

Definition at line 22 of file MessageInfo.hpp.

Function Documentation

◆ getUnusedTaps()

std::vector< const log::TapDescriptor * > sparta::log::getUnusedTaps ( const log::TapDescVec &  taps)
inline

Finds all unused taps in the given tap descriptor vector.

Parameters
tapsVector of taps from which the nubmer of unused taps will be counted \retur Vector of unused tap descriptors

Definition at line 332 of file Tap.hpp.

◆ operator<<()

std::ostream & sparta::log::operator<< ( std::ostream &  o,
const MessageInfo info 
)

ostream insertion operator for serializing MessageInfo.

The result of this operation ends up directly in log files or on the screen

Variable Documentation

◆ INFO_DELIMITER

constexpr const char* sparta::log::INFO_DELIMITER = " "
staticconstexpr

Definition at line 48 of file MessageInfo.hpp.