Writing messages to the screen
[Diagnostic Output]

Collaboration diagram for Writing messages to the screen:

Classes

class  Logger
 Base class for 'loggers' that write text messages to log files. More...
class  Application
 Class to hold global data. More...

Functions

void writelog (const std::string &msg)
 Write a message to the screen.
void writelog (const char *msg)
 Write a message to the screen.
void writelogf (const char *fmt,...)
 Write a formatted message to the screen.
void error (const std::string &msg)
 Write an error message and terminate execution.
int userInterface ()
 returns 1 for MATLAB, 2 for Python, and 0 for C++ or Fortran.
void setLogger (Logger *logwriter)
 Install a logger.
void writelog (const std::string &msg)
 Write a message to the screen.
void writelog (const char *pszmsg)
 Write a message to the screen.
void setLogger (Logger *logwriter)
 Install a logger.
void writelog (const std::string &msg)
 Write a message to the screen.
void writelogendl ()
 Write an endl to the screen and flush output.
void writelog (const char *pszmsg)
 Write a message to the screen.
void setLogger (Logger *logwriter)
 Install a logger - Called by the language interfaces to install an appropriate logger.

Function Documentation

void error ( const std::string &  msg  ) 

Write an error message and terminate execution.

This routine is part of the interface suite whose behavior changes with the interface. The interface suite has been moved to the class logger and inherited classes of logger.

Parameters:
msg Error message to be written to the screen.

Definition at line 1576 of file misc.cpp.

References Cantera::app(), and Application::logerror().

Referenced by MultiPhase::equilibrate().

void setLogger ( Logger logwriter  )  [inline, inherited]

Install a logger - Called by the language interfaces to install an appropriate logger.

Parameters:
logwriter Pointer to a logger object
See also:
Logger.

Definition at line 755 of file misc.cpp.

References Application::pMessenger.

Referenced by Cantera::setLogger().

void setLogger ( Logger logwriter  )  [inherited]

Install a logger.

Called by the language interfaces to install an appropriate logger. The logger is used for the writelog() function

Parameters:
logwriter Pointer to a logger object
See also:
Logger.

Definition at line 1608 of file misc.cpp.

References Messages::logwriter.

void setLogger ( Logger *  logwriter  ) 

Install a logger.

Called by the language interfaces to install an appropriate logger. The logger is used for the writelog() function

Parameters:
logwriter Pointer to a logger object
See also:
Logger.

Definition at line 1599 of file misc.cpp.

References Cantera::app(), Logger::error(), and Application::setLogger().

int userInterface (  ) 

returns 1 for MATLAB, 2 for Python, and 0 for C++ or Fortran.

This routine is part of the interface suite whose behavior changes with the interface. The interface suite has been moved to the class logger and inherited classes of logger.

Definition at line 1586 of file misc.cpp.

References Cantera::app(), and Application::getUserEnv().

void writelog ( const char *  pszmsg  )  [inline, inherited]

Write a message to the screen.

The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.

Parameters:
pszmsg c null terminated string to be written to the screen

Definition at line 728 of file misc.cpp.

References Application::pMessenger.

void writelog ( const std::string &  msg  )  [inline, inherited]

Write a message to the screen.

The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.

Parameters:
msg c++ string to be written to the screen

Definition at line 710 of file misc.cpp.

References Application::pMessenger.

Referenced by Cantera::writelog(), and Cantera::writelogf().

void writelog ( const char *  pszmsg  )  [inherited]

Write a message to the screen.

The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.

Parameters:
pszmsg c character string to be written to the screen

Definition at line 1541 of file misc.cpp.

References Messages::logwriter, and Logger::write().

void writelog ( const std::string &  msg  )  [inherited]

Write a message to the screen.

The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.

Parameters:
msg c++ string to be written to the screen

Definition at line 1531 of file misc.cpp.

References Messages::logwriter, and Logger::write().

Referenced by Messages::endLogGroup(), Messages::logErrors(), and Messages::write_logfile().

void writelog ( const char *  msg  ) 

Write a message to the screen.

The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.

This routine is part of the interface suite whose behavior changes with the interface. The interface suite has been moved to the class logger and inherited classes of logger.

Parameters:
msg c character string to be written to the screen

Definition at line 1536 of file misc.cpp.

References Cantera::app(), and Application::writelog().

void writelog ( const std::string &  msg  ) 

Write a message to the screen.

The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages. It can also be called by user programs. The advantage of using writelog over writing directly to the standard output is that messages written with writelog will display correctly even when Cantera is used from MATLAB or other application that do not have a standard output stream.

This routine is part of the interface suite whose behavior changes with the interface. The interface suite has been moved to the class logger and inherited classes of logger.

Parameters:
msg String message to be written to the screen

Definition at line 1526 of file misc.cpp.

References Cantera::app(), and Application::writelog().

Referenced by Cantera::BasisOptimize(), NasaThermo::checkContinuity(), Cantera::deprecatedMethod(), Cantera::ElemRearrange(), SimpleThermo::install(), ShomateThermo::install(), NasaThermo::install(), LogPrintCtrl::pr_de(), LogPrintCtrl::pr_de_c10(), Cantera::removeAtVersion(), UnknownThermoParam::UnknownThermoParam(), and Cantera::writephase().

void writelogendl (  )  [inline, inherited]

Write an endl to the screen and flush output.

Definition at line 717 of file misc.cpp.

References Application::pMessenger.

Referenced by Cantera::writelogendl().

void writelogf ( const char *  fmt,
  ... 
)

Write a formatted message to the screen.

Using the printf formatting of C, write a message to the screen with variable values.

Here, we format an internal string with the correct values and then feed it into writelog().

Parameters:
fmt c format string for the following arguments

Definition at line 1551 of file misc.cpp.

References Application::writelog().

Referenced by Cantera::BasisOptimize(), and Cantera::ElemRearrange().

Generated by  doxygen 1.6.3