12 #ifndef SSTMAC_COMMON_LOGGER_H_INCLUDED 13 #define SSTMAC_COMMON_LOGGER_H_INCLUDED 64 logger(
const std::string& namesig, std::ostream *os,
bool flush =
false,
65 const char* color =
black);
161 operator<<(const std::pair<int, int>& p);
207 std::string
time()
const;
bool is_real()
Indicates if this instance was constructed correctly.
static bool user_params_checked_
static const char * black
void update_active()
updates the active status of this logger based on the current user parameter
static spkt_unordered_map< std::string, bool > user_params_matched_
std::ostream * outstream_
static std::list< logger * > loggers_
Base type for implementations of an engine that is able to schedule events and advance simulation tim...
static void update_all_active()
updates all saved loggers based on the current user parameter
static event_manager * timer_
static void set_user_param(const std::string &s)
Static function which should be called to change which loggers are currently turned on...
bool is_active(int lev=1) const
Indicates if this logger is turned on, which is useful for bypassing std::stringifying everything...
static const char * green
Base class of things which track events in the simulation, and output in different ways...
static const char * white
static void delete_statics()
A basic container for time (subject to future transplant).
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
virtual std::string to_string() const
static const char * magenta
static void register_logger(logger *log)
Unfortunately, everyone who wants loggers to get turned on/off has to call this.
static std::deque< std::string > user_params
virtual logger & operator<<(int i)
logger()
Fake constructor for instantiating static loggers before they're sure that the static logger variable...
static bool debug_coloring_
static void check_user_params()
static const char * yellow
static void set_debug_coloring(bool c)
Sets whether we should turn text coloring on (useful for debugging in a console)
static void clear()
Clears all saved loggers that are updated on set_user_param.