The SummaryLog namespace contains helper functions for generating a summary of what happens within FC++. More...
Functions | |
std::string | getLogFilename () |
Get the name of the file used to record a summary of what FC++ runs durring a session. More... | |
bool | truncateLogFile () |
Truncate the summary log file, or create it if it didn't already exist. More... | |
bool | removeLogFile () |
Remove the summary log file. More... | |
void | add (const std::string &msg) |
Add a message to the summary log file. More... | |
The SummaryLog namespace contains helper functions for generating a summary of what happens within FC++.
These functions may be called directly, or via the log wrapper in fc::Logging.
A typical summary log looks like this:
std::string fc::SummaryLog::getLogFilename | ( | ) |
Get the name of the file used to record a summary of what FC++ runs durring a session.
This can change depending on fc::Options::setLogFileOutputDir(). If this file doesn't exist, then a summary wont be recorded.
References FC_SUMMARY_FILENAME, fc::Name::full(), fc::Options::getLogFileOutputDir(), and fc::Name::isRelative().
bool fc::SummaryLog::truncateLogFile | ( | ) |
Truncate the summary log file, or create it if it didn't already exist.
References add(), getLogFilename(), fc::libfcBitSize(), fc::libfcVersionStr(), and summary_logging_enabled.
bool fc::SummaryLog::removeLogFile | ( | ) |
Remove the summary log file.
TRUE
if the file was removed, or if it didn't exist. FALSE
if the file cannot be removed. E.g., read-only filesystem, or permission issues.References getLogFilename(), and summary_logging_enabled.
void fc::SummaryLog::add | ( | const std::string & | msg | ) |
Add a message to the summary log file.
This will automatically prepend the date, time, and TID to the message.
References getLogFilename(), and summary_logging_enabled.