FMT 0.9.8
Forest management tools for forest planning
|
#include <FMTlogger.hpp>
Public Member Functions | |
FMTlogger () | |
virtual | ~FMTlogger () |
FMTlogger (const FMTlogger &rhs) | |
void | redirectofile (const std::string &filename) |
void | closefilestream () |
FMTlogger & | operator= (const FMTlogger &rhs) |
virtual int | print () |
virtual void | checkSeverity () |
virtual FMTlogger * | clone () const |
virtual std::string | getlogstamp () const |
virtual void | logstamp () |
virtual void | logtime () |
void | setstreamflush (bool flush) |
virtual FMTlogger & | operator<< (const std::string &msg) |
virtual FMTlogger & | operator<< (const int &msg) |
virtual FMTlogger & | operator<< (const double &msg) |
virtual FMTlogger & | operator<< (const float &msg) |
virtual FMTlogger & | operator<< (const std::time_t &msg) |
virtual FMTlogger & | operator<< (const size_t &msg) |
virtual FMTlogger & | operator<< (const unsigned int &msg) |
virtual bool | logwithlevel (const std::string &msg, const int &messagelevel) const |
virtual FMTsolverlogger * | getsolverlogger () |
Protected Member Functions | |
virtual void | cout (const char *message) const |
virtual void | setlogginglevel (const int &level) |
Protected Attributes | |
std::unique_ptr< FMTsolverlogger > | solverref |
std::string | filepath |
string path the the potential filestream | |
std::ofstream * | filestream |
stream if the logger redirect the logging into somesort of file. | |
boost::recursive_mutex | mtx |
Mutex for multi-threading. | |
bool | flushstream |
If true will flush stream at each write. | |
Friends | |
class | boost::serialization::access |
FMTlogger is a base class who handle the level of stuff printed with FMT. If FMT is compiled with Osisolverinterface then this class is going to be derived from the Coinmessagehandler class to help handling the log level of the solvers.
Logging::FMTlogger::FMTlogger | ( | ) |
FMTlogger default constructor.
|
virtual |
FMTlogger default destructor.
|
virtual |
FMTlogger check the severity of the message to be print by the coinmessagehandler base class.
Reimplemented in Logging::FMTdebuglogger, Logging::FMTdefaultlogger, Logging::FMTquietlogger, and Logging::FMTtasklogger.
|
virtual |
Clone function needed for the usage of abstract
Reimplemented in Logging::FMTdebuglogger, Logging::FMTdefaultlogger, Logging::FMTquietlogger, and Logging::FMTtasklogger.
void Logging::FMTlogger::closefilestream | ( | ) |
Close the file stream if error occured.
|
protectedvirtual |
cout function of the logger sometimes on Windows if using boost::python the std::cout needs a little help to print directly into the python window.
Reimplemented in Logging::FMTquietlogger.
|
virtual |
Return the basic logstamp has a string.
|
virtual |
Return the ABSTRACT logger used by osisolverinterface.
|
virtual |
The logstramp function log information about the version of FMT and it's buildate.
|
virtual |
The logtime function log the actual time at which the function is called.
|
virtual |
Log a message with a given message level if message level is greater of equal to the logger level then it will be printed
|
virtual |
This function is the main function to add up double.
|
virtual |
This function is the main function to add up float.
|
virtual |
This function is the main function to add up int.
|
virtual |
This function is the main function to add up size_t.
|
virtual |
This function is the main function to add up string.
|
virtual |
This function is the main function to add up std::time_t.
|
virtual |
This function is the main function to add up unsigned int.
FMTlogger copy assignment operator.
|
virtual |
FMTlogger print function if we are using Osisolverinterface the coinmessagehandler print function needs to be overloaded.
Reimplemented in Logging::FMTdebuglogger, Logging::FMTdefaultlogger, Logging::FMTquietlogger, and Logging::FMTtasklogger.
void Logging::FMTlogger::redirectofile | ( | const std::string & | filename | ) |
Redirect the log information to a file.
|
protectedvirtual |
Set the solverlogger logging level
void Logging::FMTlogger::setstreamflush | ( | bool | flush | ) |
Force the flushing on file stream
|
friend |
|
protected |
string path the the potential filestream
|
mutableprotected |
stream if the logger redirect the logging into somesort of file.
|
protected |
If true will flush stream at each write.
|
mutableprotected |
Mutex for multi-threading.
|
protected |