|
Nektar++
|
Log output for std::ostream objects. More...
#include <Log.hpp>
Public Member Functions | |
| StreamOutput (std::ostream &os) | |
Construct a stream output from the stream os. | |
| ~StreamOutput () override=default | |
| Default destructor. | |
| void | Log (const std::string &msg) override |
Writes a log message to m_os. | |
Public Member Functions inherited from Nektar::LogOutput | |
| LogOutput ()=default | |
| Default constructor. | |
| virtual | ~LogOutput ()=default |
| bool | IsTty () const |
| Returns true if this is an interactive (tty) terminal (e.g. stdout). | |
Private Member Functions | |
| void | Finalise () override |
| Finalise routine. By default we do nothing for streams and assume this will be handled by the caller. | |
Private Attributes | |
| std::ostream & | m_os |
| Reference to output stream. | |
Additional Inherited Members | |
Protected Attributes inherited from Nektar::LogOutput | |
| bool | m_isTty = true |
| True if this log output is tty-based. | |
|
inline |
Construct a stream output from the stream os.
This attempts to determine whether the os is either std::cout or std::cerr, so that it can distinguish between tty-type output or file/buffer-based output streams.
Definition at line 130 of file Log.hpp.
References ISSTDERRTTY, ISSTDOUTTTY, and Nektar::LogOutput::m_isTty.
|
overridedefault |
Default destructor.
|
inlineoverrideprivatevirtual |
Finalise routine. By default we do nothing for streams and assume this will be handled by the caller.
Implements Nektar::LogOutput.
Definition at line 157 of file Log.hpp.
|
inlineoverridevirtual |
Writes a log message to m_os.
Implements Nektar::LogOutput.
Definition at line 146 of file Log.hpp.
References m_os.