Configurable, parallel logging. More...
Classes | |
| struct | config |
| Specification for Flog operation. More... | |
| struct | guard |
| Scope guard for categorizing output. More... | |
| struct | message< Policy > |
| The message type provides a basic log message type that is customized with a formatting policy. More... | |
| class | state |
| The state type provides access to logging parameters and configuration. More... | |
| struct | tag |
| A tag for labeling output to enable. More... | |
| class | tee_buffer_t |
| The tee_buffer_t type provides a stream buffer that allows output to multiple targets. More... | |
| struct | tee_stream_t |
| The tee_stream_t type provides a stream class that writes to multiple output buffers. More... | |
Macros | |
| #define | fixme() |
| Alias for severity level warn. | |
| #define | flog(severity) |
| This handles all of the different logging modes for the insertion style logging interface. | |
| #define | flog_assert(test, message) |
| Flog assertion interface. | |
| #define | flog_error(stream) |
| Method style interface for error level severity log entries. | |
| #define | flog_fatal(message) |
| Throw a runtime exception with the provided message. | |
| #define | flog_info(stream) |
| Method style interface for info level severity log entries. | |
| #define | flog_trace(stream) |
| Method style interface for trace level severity log entries. | |
| #define | flog_warn(stream) |
| Method style interface for warn level severity log entries. | |
Functions | |
| void | add_output_stream (std::string const &label, std::ostream &stream, bool colorize=false) |
| Add an output stream to FLOG. | |
| void | flush () |
| Explicitly flush buffered flog output. | |
| template<char C> | |
| std::string | rstrip (const char *file) |
| Strip path from string up to last character C. | |
| auto | tags () |
| Get all defined tags. | |
| std::string | timestamp (bool underscores=false) |
| Create a timestamp. | |
Configurable, parallel logging.
If disabled at configuration time, no output is produced.
Contents are in flecsi::flog unless otherwise specified. The name flecsi::log may also be used, but is deprecated.
| #define flog | ( | severity | ) |
This handles all of the different logging modes for the insertion style logging interface.
| severity | The severity level of the log entry. |
Usage
| #define flog_trace | ( | stream | ) |
Method style interface for trace level severity log entries.
| stream | The stream to be printed. |
Usage
| #define flog_info | ( | stream | ) |
Method style interface for info level severity log entries.
| stream | The stream to be printed. |
Usage
| #define flog_warn | ( | stream | ) |
Method style interface for warn level severity log entries.
| stream | The stream to be printed. |
Usage
| #define flog_error | ( | stream | ) |
Method style interface for error level severity log entries.
| stream | The stream to be printed. |
Usage
| #define fixme | ( | ) |
Alias for severity level warn.
| #define flog_fatal | ( | message | ) |
Throw a runtime exception with the provided message.
If FLECSI_BACKTRACE is set in the environment and NDEBUG is not defined, produce a backtrace.
| message | The stream message to be printed. |
Usage
| #define flog_assert | ( | test, | |
| message ) |
Flog assertion interface.
Assertions allow the developer to catch invalid program state. This call will invoke flog_fatal if the test condition is false.
| test | The test condition. |
| message | The stream message to be printed. |
Usage
| void flush | ( | ) |
Explicitly flush buffered flog output.
The inclusion of flecsi/runtime.hh by this header is deprecated.
| auto tags | ( | ) |
Get all defined tags.
std::string objects | void add_output_stream | ( | std::string const & | label, |
| std::ostream & | stream, | ||
| bool | colorize = false ) |
Add an output stream to FLOG.
| label | An identifier for the stream. This can be used to access or update an output stream after it has been added. |
| stream | The output stream to add. |
| colorize | Indicates whether the output to this stream should be colorized. It is useful to turn colorization off for non-interactive output (default). |
| std::string timestamp | ( | bool | underscores = false | ) |
Create a timestamp.
| std::string rstrip | ( | const char * | file | ) |
Strip path from string up to last character C.
| C | The character to strip. |