Cantera  3.1.0a2
Loading...
Searching...
No Matches
PythonLogger Class Reference
Inheritance diagram for PythonLogger:
[legend]

Detailed Description

Definition at line 50 of file utils_utils.h.

Public Member Functions

void write (const std::string &s) override
 Write a log message.
 
void writeendl () override
 Write an end of line character and flush output.
 
void warn (const std::string &warning, const std::string &msg) override
 Write a warning message.
 
void error (const std::string &msg) override
 Write an error message and quit.
 
- Public Member Functions inherited from Logger
 Logger ()
 Constructor - empty.
 
virtual ~Logger ()
 Destructor - empty.
 
virtual void write (const string &msg)
 Write a log message.
 
virtual void writeendl ()
 Write an end of line character and flush output.
 
virtual void warn (const string &warning, const string &msg)
 Write a warning message.
 
virtual void error (const string &msg)
 Write an error message and quit.
 

Member Function Documentation

◆ write()

void write ( const std::string &  msg)
inlineoverridevirtual

Write a log message.

The default behavior is to write to the standard output. Note that no end-of-line character is appended to the message, and so if one is desired it must be included in the string.

Parameters
msgString message to be written to cout

Reimplemented from Logger.

Definition at line 53 of file utils_utils.h.

◆ writeendl()

void writeendl ( )
inlineoverridevirtual

Write an end of line character and flush output.

Some systems treat endl and
differently. The endl statement causes a flushing of stdout to the screen.

Reimplemented from Logger.

Definition at line 62 of file utils_utils.h.

◆ warn()

void warn ( const std::string &  warning,
const std::string &  msg 
)
inlineoverridevirtual

Write a warning message.

The default behavior is to write to the logging output.

Parameters
warningString specifying type of warning
msgString message to be written to cout

Reimplemented from Logger.

Definition at line 67 of file utils_utils.h.

◆ error()

void error ( const std::string &  msg)
inlineoverridevirtual

Write an error message and quit.

The default behavior is to write to the standard error stream, and then call exit(). Note that no end-of-line character is appended to the message, and so if one is desired it must be included in the string. Note that this default behavior will terminate the application Cantera is invoked from (MATLAB, Excel, etc.) If this is not desired, then derive a class and reimplement this method.

Parameters
msgError message to be written to cerr.

Reimplemented from Logger.

Definition at line 76 of file utils_utils.h.


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