Cantera  2.1.2
Classes | Functions
Writing HTML Logfiles
Collaboration diagram for Writing HTML Logfiles:

Classes

class  Application
 Class to hold global data. More...
 
class  Application::Messages
 Class to carry out messages. More...
 

Functions

void beginLogGroup (const std::string &title, int loglevel)
 Create a new group for log messages. More...
 
void addLogEntry (const std::string &tag, const std::string &value)
 Add an entry to an HTML log file. More...
 
void addLogEntry (const std::string &tag, doublereal value)
 Add an entry to an HTML log file. More...
 
void addLogEntry (const std::string &tag, int value)
 Add an entry to an HTML log file. More...
 
void addLogEntry (const std::string &msg)
 Add an entry to an HTML log file. More...
 

Detailed Description

These functions are designed to allow writing HTML diagnostic messages in a manner that allows users to control how much diagnostic output to print. It works like this: Suppose you have function A that invokes function B that invokes function C. You want to be able to print diagnostic messages just from function A, or from A and B, or from A, B, and C, or to turn off printing diagnostic messages altogether. All you need to do is call 'beginLogGroup' within function A, and specify a loglevel value. Then in B, call beginLogGroup again, but without an explicit value for loglevel. By default, the current level is decremented by one in beginLogGroup. If it is <= 0, no log messages are written. Thus, if each function begins with beginLogGroup and calls endLogGroup before returning, then setting loglevel = 3 will cause messages from A, B, and C to be written (in nested HTML lists), loglevel = 2 results in messages only being written from A and B, etc.

Function Documentation

void beginLogGroup ( const std::string &  title,
int  loglevel 
)

Create a new group for log messages.

Usually this is called upon entering the function, with the title parameter equal to the name of the function or method. Subsequent messages written with addLogEntry will appear grouped under this heading, until endLogGroup() is called.

Parameters
titleString name of the LogGroup
loglevelloglevel of the group.
Deprecated:
HTML logs will be removed in Cantera 2.2

Definition at line 155 of file application.cpp.

References Cantera::warn_deprecated().

Referenced by Application::beginLogGroup().

void addLogEntry ( const std::string &  tag,
const std::string &  value 
)

Add an entry to an HTML log file.

Entries appear in the form "tag:value".

Parameters
tagtag
valuestring value
Deprecated:
HTML logs will be removed in Cantera 2.2

Definition at line 187 of file application.cpp.

Referenced by Application::addLogEntry().

void addLogEntry ( const std::string &  tag,
doublereal  value 
)

Add an entry to an HTML log file.

Entries appear in the form "tag:value".

Parameters
tagtag
valuedouble value
Deprecated:
HTML logs will be removed in Cantera 2.2

Definition at line 194 of file application.cpp.

References Cantera::fp2str().

void addLogEntry ( const std::string &  tag,
int  value 
)

Add an entry to an HTML log file.

Entries appear in the form "tag:value".

Parameters
tagtag
valueinteger value
Deprecated:
HTML logs will be removed in Cantera 2.2

Definition at line 201 of file application.cpp.

References Cantera::int2str().

void addLogEntry ( const std::string &  msg)

Add an entry to an HTML log file.

Entries appear in the form "msg".

Parameters
msgMessage to be added
Deprecated:
HTML logs will be removed in Cantera 2.2

Definition at line 208 of file application.cpp.