FleCSI Core API Version: 2.4.2
Loading...
Searching...
No Matches
state Class Reference

The state type provides access to logging parameters and configuration. More...

Public Member Functions

tee_stream_tconfig_stream ()
 Return the tee stream to allow the user to set configuration options.
std::ostream & stream ()
 Return the log stream.

Static Public Member Functions

static Tag & active_tag ()
 Return a reference to the active tag.
static std::string active_tag_name ()
 Return the tag name associated with the active tag.
static bool color_output ()
 Return true if ANSI color support for messages was requested.
static Tag register_tag (const char *tag)
 Return the next tag id.
static const std::unordered_map< std::string, Tag > & tag_map ()
 Return the tag map.
static std::string tag_name (Tag id)
 Return the tag name associated with a tag id.

Detailed Description

The state type provides access to logging parameters and configuration.

This type provides access to the underlying logging parameters for configuration and information. The FleCSI logging functions provide basic logging with an interface that is similar to Google's GLOG and the Boost logging utilities.

Note
We may want to consider adopting one of these packages in the future.

Member Function Documentation

◆ color_output()

bool color_output ( )
static

Return true if ANSI color support for messages was requested.

Note that this is a static method. If the (singleton) state has not yet been constructed, return the compile-time default colorization flag FLOG_ENABLE_COLOR_OUTPUT. Otherwise, return the value specified at run time by color.

◆ tag_map()

const std::unordered_map< std::string, Tag > & tag_map ( )
static

Return the tag map.

◆ stream()

std::ostream & stream ( )

Return the log stream.

◆ config_stream()

tee_stream_t & config_stream ( )

Return the tee stream to allow the user to set configuration options.

FIXME: Need a better interface for this...

◆ register_tag()

Tag register_tag ( const char * tag)
static

Return the next tag id.

◆ active_tag()

state::Tag & active_tag ( )
static

Return a reference to the active tag.

◆ tag_name()

std::string tag_name ( Tag id)
static

Return the tag name associated with a tag id.

◆ active_tag_name()

std::string active_tag_name ( )
static

Return the tag name associated with the active tag.