#include <types.hh>
The tee_buffer_t type provides a stream buffer that allows output to multiple targets.
◆ add_buffer()
void flecsi::log::tee_buffer_t::add_buffer |
( |
std::string |
key, |
|
|
std::streambuf * |
sb, |
|
|
bool |
colorized |
|
) |
| |
|
inline |
Add a buffer to which output should be written. This also enables the buffer,i.e., output will be written to it. For a given key, only the first call to this method will have an effect.
◆ disable_buffer()
bool flecsi::log::tee_buffer_t::disable_buffer |
( |
std::string |
key | ) |
|
|
inline |
Disable a buffer so that output is not written to it.
◆ enable_buffer()
bool flecsi::log::tee_buffer_t::enable_buffer |
( |
std::string |
key | ) |
|
|
inline |
Enable a buffer so that output is written to it. This is mainly for buffers that have been disabled and need to be re-enabled.
◆ overflow()
virtual int flecsi::log::tee_buffer_t::overflow |
( |
int |
c | ) |
|
|
inlineprotectedvirtual |
Override the overflow method. This streambuf has no buffer, so overflow happens for every character that is written to the string, allowing us to write to multiple output streams. This method also detects colorization strings embedded in the character stream and removes them from output that is going to non-colorized buffers.
- Parameters
-
c | The character to write. This is passed in as an int so that non-characters like EOF can be written to the stream. |
◆ sync()
virtual int flecsi::log::tee_buffer_t::sync |
( |
| ) |
|
|
inlineprotectedvirtual |
Override the sync method so that we sync all of the output buffers.
The documentation for this class was generated from the following file:
- /home/bergen/devel/tuxfan/flecsi/flecsi/log/types.hh