FC++  v0.7.1-1067
FileCatalyst Fast File Transfers - C++ Library
fc::SummaryLog Namespace Reference

The SummaryLog namespace contains helper functions for generating a summary of what happens within FC++. More...

Functions

std::string getLogFilename (void)
 Get the name of the file used to record a summary of what FC++ runs durring a session. More...
 
bool truncateLogFile (void)
 Truncate the summary log file, or create it if it didn't already exist. More...
 
bool removeLogFile (void)
 Remove the summary log file. More...
 
void add (const std::string &msg)
 Add a message to the summary log file. More...
 

Detailed Description

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:

2016-05-16 17:06:41 EDT 9054:9054 downloading 1.00 KiB: ./test.txt
2016-05-16 17:06:41 EDT 9054:9054 >> REST 0
2016-05-16 17:06:41 EDT 9054:9054 << 350 Restart position accepted (0).
2016-05-16 17:06:41 EDT 9054:9054 >> RETR "/test.txt" 583771335
2016-05-16 17:06:41 EDT 9054:9054 << 150 Sending data for e.txt (1025 bytes). Sending from port 8096
2016-05-16 17:06:42 EDT 9054:9054 >> RBACK -1
2016-05-16 17:06:43 EDT 9054:9054 << 226 Transfer complete.
2016-05-16 17:06:43 EDT 9054:9054 >> MD5 "/test.txt"
2016-05-16 17:06:44 EDT 9054:9054 << 213 AE187E1FEBEE2A150B64849C32D566CA
2016-05-16 17:06:44 EDT 9054:9054 download statistics for /test.txt <- ./test.txt
ACK packets received: 1
Average transfer rate: 31.06 Kbps
Block size: 1.00 KiB
Blocks completed: 1
Bytes expected: 1.00 KiB
Bytes transferred: 1.00 KiB
...
See also
fc::Logging::EType::kSummary
fc::Logging::enable()

Function Documentation

std::string fc::SummaryLog::getLogFilename ( void  )

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.

See also
fc::SummaryLog::removeLogFile()
fc::Logging::get_filename()
fc::Logging::EType::kSummary
bool fc::SummaryLog::truncateLogFile ( void  )

Truncate the summary log file, or create it if it didn't already exist.

See also
fc::Logging::enable()
fc::Logging::EType::kSummary
bool fc::SummaryLog::removeLogFile ( void  )

Remove the summary log file.

Returns
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.
See also
fc::Logging::disable()
fc::Logging::EType::kSummary
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.

Here is the caller graph for this function: