FleCSI Core API Version: 2.3.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 std::size_t & 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 void gather (state &s)
 Gather log output on the root.
 
static std::size_t log_size (const state &s)
 Return number of buffered packets.
 
static std::size_t register_tag (const char *tag)
 Return the next tag id.
 
static const std::unordered_map< std::string, size_t > & tag_map ()
 Return the tag map.
 
static std::string tag_name (size_t 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()

static 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 config::color.

◆ tag_map()

static const std::unordered_map< std::string, size_t > & 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()

static std::size_t register_tag ( const char * tag)
static

Return the next tag id.

◆ active_tag()

std::size_t & active_tag ( )
static

Return a reference to the active tag.

◆ tag_name()

static std::string tag_name ( size_t id)
static

Return the tag name associated with a tag id.

◆ active_tag_name()

static std::string active_tag_name ( )
static

Return the tag name associated with the active tag.

◆ log_size()

static std::size_t log_size ( const state & s)
static

Return number of buffered packets.

◆ gather()

static void gather ( state & s)
static

Gather log output on the root.