20 #if !defined(__MITSUBA_CORE_APPENDER_H_)
21 #define __MITSUBA_CORE_APPENDER_H_
23 #include <mitsuba/mitsuba.h>
36 virtual void append(
ELogLevel level,
const std::string &text) = 0;
49 virtual void logProgress(
Float progress,
const std::string &name,
50 const std::string &formatted,
const std::string &eta,
81 const std::string &formatted,
const std::string &eta,
88 void readLog(std::string &target);
98 std::ostream *m_stream;
99 std::
string m_fileName;
101 bool m_lastMessageWasProgress;
119 const std::string &formatted,
const std::string &eta,
131 bool m_lastMessageWasProgress;
Appender implementation, which writes to an arbitrary C++ output stream
Definition: appender.h:65
virtual void logProgress(Float progress, const std::string &name, const std::string &formatted, const std::string &eta, const void *ptr)=0
Process a progress message.
bool logsToFile() const
Does this appender log to a file.
Definition: appender.h:85
#define MTS_EXPORT_CORE
Definition: getopt.h:29
Appender implementation, which writes directly to an UNIX-style unbuffered file descriptor.
Definition: appender.h:109
virtual void append(ELogLevel level, const std::string &text)=0
Append a line of text with the given log level.
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
This class defines an abstract destination for logging-relevant information.
Definition: appender.h:33
ELogLevel
Available Log message types.
Definition: formatter.h:28
Parent of all Mitsuba classes.
Definition: object.h:38
virtual std::string toString() const
Return a human-readable string representation of the object's contents.