FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
Logging::FMTDebugLogger Class Referencefinal

Debug level logger derived from FMTLogger that prints more than FMTDefaultLogger. More...

#include <FMTDebugLogger.h>

Inheritance diagram for Logging::FMTDebugLogger:
[legend]
Collaboration diagram for Logging::FMTDebugLogger:
[legend]

Public Member Functions

 FMTDebugLogger ()
 Default constructor for FMTDebugLogger.
 
FMTDebugLoggeroperator= (const FMTDebugLogger &rhs)=default
 Default copy assignment operator for FMTDebugLogger.
 
 FMTDebugLogger (const FMTDebugLogger &rhs)=default
 Default copy constructor for FMTDebugLogger.
 
int print () override
 Debug print level used by FMT for the OSI solver interface. See FMTLogger::print.
 
void checkSeverity () override
 Debug severity check used by FMT for the OSI solver interface. See FMTLogger::checkSeverity.
 
FMTLoggerclone () const override
 Clone the logger for the OSI solver interface. See FMTLogger::clone.
 
 ~FMTDebugLogger ()=default
 Default destructor for FMTDebugLogger.
 
virtual std::unique_ptr< FMTLoggerClone () const
 clone the FMTDebugLogger
 
- Public Member Functions inherited from Logging::FMTLogger
 FMTLogger ()
 Default constructor for FMTLogger.
 
virtual ~FMTLogger ()
 Default destructor for FMTLogger.
 
 FMTLogger (const FMTLogger &rhs)
 Copy constructor for FMTLogger.
 
void redirectToFile (const std::string &filename, bool logStamp=true)
 Redirect the log information to a file.
 
void closeFileStream ()
 Close the file stream.
 
FMTLoggeroperator= (const FMTLogger &rhs)
 Copy assignment operator for FMTLogger.
 
virtual int print ()
 Print function overloaded from CoinMessageHandler when using the OSI solver interface.
 
virtual void checkSeverity ()
 Check the severity of the message to be printed by the CoinMessageHandler base class.
 
virtual FMTLoggerclone () const =0
 Clone the logger, needed for the abstract CoinMessageHandler usage.
 
virtual std::string getLogStamp () const
 Return the basic log stamp as a string.
 
virtual void logStamp ()
 Log information about the version of FMT and its build date.
 
virtual void logTime ()
 Log the actual time at which the function is called.
 
void setStreamFlush (bool flush)
 Force the flushing of the file stream.
 
virtual FMTLoggeroperator<< (const std::string &msg)
 Append a string to the log.
 
virtual FMTLoggeroperator<< (const int &msg)
 Append an int to the log.
 
virtual FMTLoggeroperator<< (const double &msg)
 Append a double to the log.
 
virtual FMTLoggeroperator<< (const float &msg)
 Append a float to the log.
 
virtual FMTLoggeroperator<< (const std::time_t &msg)
 Append a std::time_t to the log.
 
virtual FMTLoggeroperator<< (const size_t &msg)
 Append a size_t to the log.
 
virtual FMTLoggeroperator<< (const unsigned int &msg)
 Append an unsigned int to the log.
 
virtual FMTLoggeroperator<< (const void *&msg)
 Append the address of a void pointer to the log.
 
virtual bool logWithLevel (const std::string &p_msg, const int &p_messageLevel) const
 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 FMTSolverLoggergetSolverLogger ()
 Return the abstract logger used by the OSI solver interface.
 
virtual std::unique_ptr< FMTLoggerClone () const =0
 clone the FMTLogger
 

Friends

class boost::serialization::access
 Serialize the FMTDebugLogger through its base FMTLogger for multiprocessing across multiple cpus (pickle in Python).
 

Additional Inherited Members

- Protected Member Functions inherited from Logging::FMTLogger
virtual void _cout (const char *message) const
 Output a message, sometimes needed on Windows with boost::python to print directly into the Python window.
 
virtual void _setLoggingLevel (const int &level)
 Set the solver logger logging level.
 
- Protected Attributes inherited from Logging::FMTLogger
std::unique_ptr< FMTSolverLoggerm_solverref
 
std::string m_filepath
 string path the the potential filestream
 
std::unique_ptr< std::ofstream > m_FileStream
 stream if the logger redirect the logging into somesort of file.
 
boost::recursive_mutex m_mtx
 Mutex for multi-threading.
 
bool m_flushstream
 If true will flush stream at each write.
 

Detailed Description

Debug level logger derived from FMTLogger that prints more than FMTDefaultLogger.

Constructor & Destructor Documentation

◆ FMTDebugLogger() [1/2]

Logging::FMTDebugLogger::FMTDebugLogger ( )

Default constructor for FMTDebugLogger.

◆ FMTDebugLogger() [2/2]

Logging::FMTDebugLogger::FMTDebugLogger ( const FMTDebugLogger rhs)
default

Default copy constructor for FMTDebugLogger.

Parameters
[in]rhsthe FMTDebugLogger to copy.

◆ ~FMTDebugLogger()

Logging::FMTDebugLogger::~FMTDebugLogger ( )
default

Default destructor for FMTDebugLogger.

Member Function Documentation

◆ checkSeverity()

void Logging::FMTDebugLogger::checkSeverity ( )
overridevirtual

Debug severity check used by FMT for the OSI solver interface. See FMTLogger::checkSeverity.

Reimplemented from Logging::FMTLogger.

◆ Clone()

virtual std::unique_ptr< FMTLogger > Logging::FMTDebugLogger::Clone ( ) const
virtual

clone the FMTDebugLogger

Returns
a valid clonedFMTdebuglogger

Implements Logging::FMTLogger.

◆ clone()

FMTLogger * Logging::FMTDebugLogger::clone ( ) const
overridevirtual

Clone the logger for the OSI solver interface. See FMTLogger::clone.

Returns
a pointer to the cloned logger.

Implements Logging::FMTLogger.

◆ operator=()

FMTDebugLogger & Logging::FMTDebugLogger::operator= ( const FMTDebugLogger rhs)
default

Default copy assignment operator for FMTDebugLogger.

Parameters
[in]rhsthe FMTDebugLogger to copy.
Returns
a reference to this FMTDebugLogger.

◆ print()

int Logging::FMTDebugLogger::print ( )
overridevirtual

Debug print level used by FMT for the OSI solver interface. See FMTLogger::print.

Returns
the value returned by the print function.

Reimplemented from Logging::FMTLogger.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialize the FMTDebugLogger through its base FMTLogger for multiprocessing across multiple cpus (pickle in Python).

Template Parameters
Archivethe archive type.
Parameters
[in,out]arthe archive to serialize to or from.
[in]versionthe serialization version.

The documentation for this class was generated from the following file: