EventAnalysis
1.3.0
|
Classes | |
class | FilesProxy |
Enumerations | |
enum | VerboseLevel { VerboseLevel::SILENT = 0, VerboseLevel::ERROR = 1, VerboseLevel::WARNING = 2, VerboseLevel::INFO = 3, VerboseLevel::DEBUG = 4, VerboseLevel::DEEPDEB = 5 } |
Functions | |
bool | operator> (const VerboseLevel &vl1, const VerboseLevel &vl2) |
std::string | Format (const std::string &str, size_t maxLength) |
Format a string so that its length is less or equal to maxLength. More... | |
void | MuteOutput () |
Mutes the console output. More... | |
void | UnmuteOutput () |
Unmutes the console output. More... | |
Variables | |
const char * | levelNames [6] = {"", "ERROR", "WARNING", "", "DEBUG", "DEEPDEB"} |
Name of verbosity levels, which will be printed on stdout at each call of COUT. More... | |
VerboseLevel | verboseLevel = VerboseLevel::INFO |
The maximum desired verbosity. More... | |
int | maxRoutineNameLength = 30 |
The maximum length for the printed routine name. More... | |
FILE * | stdoutSave = NULL |
FILE * | stderrSave = NULL |
std::streambuf * | cout_sbuf = NULL |
std::streambuf * | cerr_sbuf = NULL |
FilesProxy | muteFiles |
bool | isMuted = false |
|
strong |
std::string EA::SmartLog::Format | ( | const std::string & | str, |
size_t | maxLength | ||
) |
Format a string so that its length is less or equal to maxLength.
If the string is longer than maxLength it will be trimmed down. For example, if str="dummyString" and maxLength=9 the returned string will be "dummyS...".
str | The string to be formatted. |
maxLength | The maximum length of the formatted string. |
void EA::SmartLog::MuteOutput | ( | ) |
Mutes the console output.
This method redirects the output of std::cout and std::cerr to /dev/null, avoiding any message to be printed on the console. Use UnmuteOutput to unmute the console.
|
inline |
void EA::SmartLog::UnmuteOutput | ( | ) |
Unmutes the console output.
This method cancels the effects of MuteOutput.
std::streambuf* EA::SmartLog::cerr_sbuf = NULL |
std::streambuf* EA::SmartLog::cout_sbuf = NULL |
bool EA::SmartLog::isMuted = false |
const char * EA::SmartLog::levelNames = {"", "ERROR", "WARNING", "", "DEBUG", "DEEPDEB"} |
Name of verbosity levels, which will be printed on stdout at each call of COUT.
int EA::SmartLog::maxRoutineNameLength = 30 |
The maximum length for the printed routine name.
FilesProxy EA::SmartLog::muteFiles |
FILE* EA::SmartLog::stderrSave = NULL |
FILE* EA::SmartLog::stdoutSave = NULL |
VerboseLevel EA::SmartLog::verboseLevel = VerboseLevel::INFO |
The maximum desired verbosity.