Cantera
2.1.2
|
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... | |
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.
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.
title | String name of the LogGroup |
loglevel | loglevel of the group. |
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".
tag | tag |
value | string value |
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".
tag | tag |
value | double value |
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".
tag | tag |
value | integer value |
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".
msg | Message to be added |
Definition at line 208 of file application.cpp.