Logging stream class.
More...
#include <LogStream.h>
|
| | LogStream (std::ostream *out) |
| | Default constructor. More...
|
| |
| | LogStream (std::ostream &out, int ppid=0, int mypid=0) |
| | Constructor initializing the output stream from a reference. More...
|
| |
|
void | setNull () |
| | Nullifies the output stream.
|
| |
|
void | setStream (std::ostream &out) |
| | Sets the output stream.
|
| |
|
void | setPIDs (int ppid, int mypid) |
| | Sets PIDs for the stream.
|
| |
|
void | addExtraLog (std::ostream *extra, bool clear=false) |
| | Adds an extra logging stream.
|
| |
|
void | addExtraLog (std::shared_ptr< std::ostream > extra, bool clear=false) |
| | Adds an extra logging stream.
|
| |
|
void | removeExtraLog (std::shared_ptr< std::ostream > extra) |
| | Drop an extra logging stream.
|
| |
|
template<typename T > |
| LogStream & | operator<< (const T &data) |
| | Write data to stream.
|
| |
|
template<typename T > |
| LogStream & | write (const T &data) |
| | Write data to stream.
|
| |
|
int | precision (int streamsize) |
| | Set precision of output.
|
| |
|
int | precision () const |
| | Get current precision.
|
| |
|
bool | good () const |
| | Check state of stream.
|
| |
|
void | flush () |
| | Flush streams.
|
| |
|
std::ios_base::fmtflags | flags () const |
| | Obtain stream flags.
|
| |
|
std::ios_base::fmtflags | flags (std::ios_base::fmtflags fmtfl) |
| | Set stream flags.
|
| |
|
LogStream & | operator= (const LogStream &) |
| | Assignment operator.
|
| |
|
LogStream & | operator<< (StandardEndLine manip) |
| | Handling of the std::endl manipulator with friends.
|
| |
|
|
std::ostream * | m_out |
| | Main output stream.
|
| |
|
std::vector< std::shared_ptr< std::ostream > > | m_extra |
| | Extra output streams.
|
| |
|
int | m_ppid |
| | PID to print on.
|
| |
|
int | m_pid |
| | This process' PID.
|
| |
◆ LogStream() [1/2]
| utl::LogStream::LogStream |
( |
std::ostream * |
out | ) |
|
|
inlineexplicit |
Default constructor.
- Parameters
-
| out | The output stream to wrap |
References m_pid, and m_ppid.
◆ LogStream() [2/2]
| utl::LogStream::LogStream |
( |
std::ostream & |
out, |
|
|
int |
ppid = 0, |
|
|
int |
mypid = 0 |
|
) |
| |
|
explicit |
Constructor initializing the output stream from a reference.
- Parameters
-
| out | The output stream to wrap |
| ppid | The PID to print on |
| mypid | The PID of this process |
The documentation for this class was generated from the following files: