Classes | |
class | Application |
Class to hold global data. More... | |
class | Messages |
Class to carry out messages. More... | |
Functions | |
void | beginLogGroup (std::string title, int loglevel=-99) |
Create a new group for log messages. | |
void | addLogEntry (std::string tag, std::string value) |
Add an entry to an HTML log file. | |
void | addLogEntry (std::string tag, doublereal value) |
Add an entry to an HTML log file. | |
void | addLogEntry (std::string tag, int value) |
Add an entry to an HTML log file. | |
void | addLogEntry (std::string msg) |
Add an entry msg string to an HTML log file. | |
void | endLogGroup (std::string title="") |
Close the current group of log messages. | |
void | write_logfile (std::string file="log.html") |
Write the HTML log file. | |
void | beginLogGroup (std::string title, int loglevel) |
Create a new group for log messages. | |
void | addLogEntry (std::string tag, std::string value) |
Add an entry to an HTML log file. | |
void | addLogEntry (std::string tag, doublereal value) |
Add an entry to an HTML log file. | |
void | addLogEntry (std::string tag, int value) |
Add an entry to an HTML log file. | |
void | addLogEntry (std::string msg) |
Add an entry to an HTML log file. | |
void | beginLogGroup (std::string title, int loglevel) |
Create a new group for log messages. | |
void | addLogEntry (std::string tag, std::string value) |
Add an entry to an HTML log file. | |
void | addLogEntry (std::string tag, doublereal value) |
Add an entry to an HTML log file. | |
void | addLogEntry (std::string tag, int value) |
Add an entry to an HTML log file. | |
void | addLogEntry (std::string msg) |
Add an entry to an HTML log file. | |
void | endLogGroup (std::string title) |
Close the current group of log messages. |
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 addLogEntry | ( | std::string | msg | ) | [inline, inherited] |
Add an entry to an HTML log file.
Entries appear in the form "msg".
msg | Message to be added to file |
Definition at line 816 of file misc.cpp.
References Application::pMessenger.
void addLogEntry | ( | std::string | tag, | |
int | value | |||
) | [inline, inherited] |
Add an entry to an HTML log file.
Entries appear in the form "tag:value".
tag | tag | |
value | double value |
Definition at line 806 of file misc.cpp.
References Application::pMessenger.
void addLogEntry | ( | std::string | tag, | |
doublereal | value | |||
) | [inline, inherited] |
Add an entry to an HTML log file.
Entries appear in the form "tag:value".
tag | tag | |
value | double value |
Definition at line 795 of file misc.cpp.
References Application::pMessenger.
void addLogEntry | ( | std::string | tag, | |
std::string | value | |||
) | [inline, inherited] |
Add an entry to an HTML log file.
Entries appear in the form "tag:value".
tag | tag | |
value | double value |
Definition at line 784 of file misc.cpp.
References Application::pMessenger.
Referenced by Cantera::addLogEntry().
void addLogEntry | ( | std::string | msg | ) | [inherited] |
Add an entry to an HTML log file.
Entries appear in the form "msg".
msg | Message to be added |
Definition at line 1720 of file misc.cpp.
References XML_Node::addChild(), Messages::current, and Messages::loglevel.
void addLogEntry | ( | std::string | tag, | |
int | value | |||
) | [inherited] |
Add an entry to an HTML log file.
Entries appear in the form "tag:value".
tag | tag | |
value | double value |
Definition at line 1709 of file misc.cpp.
References XML_Node::addChild(), Messages::current, Cantera::int2str(), and Messages::loglevel.
void addLogEntry | ( | std::string | tag, | |
doublereal | value | |||
) | [inherited] |
Add an entry to an HTML log file.
Entries appear in the form "tag:value".
tag | tag | |
value | double value |
Definition at line 1697 of file misc.cpp.
References XML_Node::addChild(), Messages::current, Cantera::fp2str(), and Messages::loglevel.
void addLogEntry | ( | std::string | tag, | |
std::string | value | |||
) | [inherited] |
Add an entry to an HTML log file.
Entries appear in the form "tag:value".
tag | tag | |
value | double value |
Definition at line 1685 of file misc.cpp.
References XML_Node::addChild(), Messages::current, and Messages::loglevel.
void addLogEntry | ( | std::string | msg | ) |
Add an entry msg string to an HTML log file.
Add a message string to the HTML log file
msg | string mesg |
Definition at line 1716 of file misc.cpp.
References Application::addLogEntry(), and Cantera::app().
void addLogEntry | ( | std::string | tag, | |
int | value | |||
) |
Add an entry to an HTML log file.
Entries appear in the form "tag:value".
tag | tag | |
value | int value |
Definition at line 1705 of file misc.cpp.
References Application::addLogEntry(), and Cantera::app().
void addLogEntry | ( | 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 1693 of file misc.cpp.
References Application::addLogEntry(), and Cantera::app().
void addLogEntry | ( | std::string | tag, | |
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 1681 of file misc.cpp.
References Application::addLogEntry(), and Cantera::app().
Referenced by MultiPhase::equilibrate(), vcs_MultiPhaseEquil::equilibrate_HP(), vcs_MultiPhaseEquil::equilibrate_SP(), vcs_MultiPhaseEquil::equilibrate_TP(), and vcs_MultiPhaseEquil::equilibrate_TV().
void beginLogGroup | ( | std::string | title, | |
int | loglevel | |||
) | [inline, inherited] |
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 773 of file misc.cpp.
References Application::pMessenger.
Referenced by Cantera::beginLogGroup().
void beginLogGroup | ( | std::string | title, | |
int | loglevel | |||
) | [inherited] |
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 1655 of file misc.cpp.
References XML_Node::addChild(), Messages::current, Messages::loggroups, Messages::loglevel, Messages::loglevels, and Messages::xmllog.
void beginLogGroup | ( | std::string | title, | |
int | loglevel = -99 | |||
) |
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 1651 of file misc.cpp.
References Cantera::app(), and Application::beginLogGroup().
Referenced by MultiPhase::equilibrate(), vcs_MultiPhaseEquil::equilibrate_HP(), vcs_MultiPhaseEquil::equilibrate_SP(), vcs_MultiPhaseEquil::equilibrate_TP(), and vcs_MultiPhaseEquil::equilibrate_TV().
void endLogGroup | ( | std::string | title | ) | [inline, inherited] |
Close the current group of log messages.
This is typically called just before leaving a function or method, to close the group of messages that were output from this function. Subsequent messages written with addLogEntry() will appear at the next-higher level in the outline, unless beginLogGroup() is called first to create a new group.
title | Name of the log group. It defaults to the most recent log group created. |
Definition at line 831 of file misc.cpp.
References Application::pMessenger.
Referenced by Cantera::endLogGroup().
void endLogGroup | ( | std::string | title = "" |
) |
Close the current group of log messages.
This is typically called just before leaving a function or method, to close the group of messages that were output from this function. Subsequent messages written with addLogEntry() will appear at the next-higher level in the outline, unless beginLogGroup() is called first to create a new group.
title | Name of the log group. It defaults to the most recent log group created. |
Definition at line 1732 of file misc.cpp.
References Cantera::app(), and Application::endLogGroup().
Referenced by MultiPhase::equilibrate(), vcs_MultiPhaseEquil::equilibrate_HP(), vcs_MultiPhaseEquil::equilibrate_SP(), vcs_MultiPhaseEquil::equilibrate_TP(), and vcs_MultiPhaseEquil::equilibrate_TV().
void write_logfile | ( | std::string | file = "log.html" |
) |
Write the HTML log file.
Log entries are stored in memory in an XML tree until this function is called, which writes the tree to a file and clears the entries stored in memory. The output file will have the name specified in the 'file' argument. If this argument has no extension, the extension '.html' will be appended. Also, if the file already exists, an integer will be appended to the name so that no existing log file will be overwritten. WITH_HTML_LOGS must be defined.
file | Name of the file to be written |
Definition at line 1780 of file misc.cpp.
References Cantera::app(), and Application::write_logfile().