 |
PhoenixMock
1.8.7
Tools to split/merge/print mock used in Phoenix
|
Go to the documentation of this file.
42 log.
getLog() <<
"Some log entry" << std::endl;
43 log.
getLog() <<
"Some other log entry" << std::endl;
54 log.
getLogDebug() <<
"Some other debug log entry" << std::endl;
56 log.
getLog() <<
"Some other info log entry" << std::endl;
57 log.
getLogInfo() <<
"Some other info log entry (again)" << std::endl;
59 log.
getLogWarning() <<
"Some other warning log entry" << std::endl;
61 log.
getLogError() <<
"Some other error log entry" << std::endl;
63 log.
getLogCritical() <<
"Some other critical log entry" << std::endl;
73 log.
getLog() <<
"Log of all threads" << std::endl;
74 for(
size_t i(0lu); i < nbThread; ++i){
76 subLog.
getLog() <<
" i = "<<i<<
", Some log entry" << std::endl;
77 subLog.
getLog() <<
" i = "<<i<<
", Some other log entry" << std::endl;
88 std::cout <<
"Some redirected std::cout stuff" << std::endl;
89 std::cerr <<
"Some redirected std::cerr stuff" << std::endl;
90 log.
getLog() <<
"Some classic log" << std::endl;
102 log.
getLog() <<
"Some log message" << std::endl;
103 log.
getLog() <<
"Some classic log" << std::endl;
114 log.
getLog() <<
"Some log message" << std::endl;
115 log.
getLog() <<
"Some classic log" << std::endl;
125 log.
getLogInfo() <<
"Let's test log append" << std::endl;
134 logStr.
getLogDebug() <<
"Some other debug log entry" << std::endl;
136 logStr.
getLog() <<
"Some other info log entry" << std::endl;
137 logStr.
getLogInfo() <<
"Some other info log entry (again)" << std::endl;
139 log.
getLogInfo() <<
"Some log info at the same time (should be before log append)" << std::endl;
142 logStr.
getLogWarning() <<
"Some other warning log entry" << std::endl;
144 logStr.
getLogError() <<
"Some other error log entry" << std::endl;
146 logStr.
getLogCritical() <<
"Some other critical log entry" << std::endl;
148 log.
getLogInfo() <<
"Just before log append" << std::endl;
152 log.
getLogInfo() <<
"Just after log append" << std::endl;
157 int main(
int argc,
char** argv){
void setThreadIndex(size_t threadIndex)
Set the thread index of the current PLog.
PLog & getLog(size_t threadIndex)
Get the PLog at given index.
const std::string & getFileName() const
Get the filename of the current log.
void testLogCoutDedirectInFile()
Test if the std::cout redirection is working.
std::ostream & getLogError()
Write error message into the PLog.
void close()
Close the current PLog and its children.
void appendLog(std::stringstream &str)
Append the log (STRING_ONLY mode) into an other log.
std::ostream & getLogWarning()
Write warning message into the PLog.
void testStringToLogLevel()
Test the conversion of string into log level.
void setFileName(const std::string &fileName)
Set the output filename of the current PLog.
std::string phoenix_logLevelToStr(PLog::Level logLevel)
Convert the log level into a string.
@ FILE_CAPTURE_STDOUT_STDERR
void testLogLevelToString()
Test the conversion of log level into string.
void setLogLevel(PLog::Level logLevel)
Set the log level of the current PLog.
std::ostream & getLogDebug()
Write debug message into the PLog.
std::ostream & getLogInfo()
Write info message into the PLog.
void resize(size_t nbThread)
Resize the number of cihldren log file.
void setMode(PLog::Mode mode)
Set the mode of the current PLog.
bool open()
Open the current PLog and its children.
void testStringPLogLevel()
Test the PLog.
void testStringMultiPLog()
Test the PLog.
void testStringLogAppend()
Test if the STRING_ONLY log mode works.
void testLogDisable()
Test if the std::cout redirection is working.
#define phoenix_assert(isOk)
std::stringstream & getLogString()
Get the log string.
void testLogStdoutOnly()
Test if the std::cout redirection is working.
std::ostream & getLogCritical()
Write critical message into the PLog.
int main(int argc, char **argv)
void testStringPLog()
Test the PLog.
size_t getThreadIndex() const
Get the thread index of the current PLog.
PLog::Level phoenix_strToLogLevel(const std::string &str)
Convert a string into a log level.