PhoenixMock  1.8.7
Tools to split/merge/print mock used in Phoenix
PLog.h File Reference
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
+ Include dependency graph for PLog.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PLog
 Phoenix Logger. More...
 

Functions

std::string phoenix_logLevelToStr (PLog::Level logLevel)
 Convert the log level into a string. More...
 
PLog::Level phoenix_strToLogLevel (const std::string &str)
 Convert a string into a log level. More...
 

Function Documentation

◆ phoenix_logLevelToStr()

std::string phoenix_logLevelToStr ( PLog::Level  logLevel)

Convert the log level into a string.

Parameters
logLevel: log level to be converted
Returns
corresponding string

Definition at line 17 of file PLog.cpp.

17  {
18  switch(logLevel){
19  case PLog::INFO:
20  return "INFO";
21  case PLog::WARNING:
22  return "WARNING";
23  case PLog::ERROR:
24  return "ERROR";
25  case PLog::CRITICAL:
26  return "CRITICAL";
27  case PLog::ALWAYS:
28  return "ALWAYS";
29  default:
30  return "DEBUG";
31  }
32 }

References PLog::ALWAYS, PLog::CRITICAL, PLog::ERROR, PLog::INFO, and PLog::WARNING.

Referenced by PLog::getLog(), PLog::open(), and testLogLevelToString().

+ Here is the caller graph for this function:

◆ phoenix_strToLogLevel()

PLog::Level phoenix_strToLogLevel ( const std::string &  str)

Convert a string into a log level.

Parameters
str: string ot be converted
Returns
corresponding PLog::Level

Definition at line 38 of file PLog.cpp.

38  {
39  if(str == "DEBUG"){return PLog::DEBUG;}
40  else if(str == "WARNING"){return PLog::WARNING;}
41  else if(str == "ERROR"){return PLog::ERROR;}
42  else if(str == "CRITICAL"){return PLog::CRITICAL;}
43  else if(str == "ALWAYS"){return PLog::ALWAYS;}
44  else{return PLog::INFO;}
45 }

References PLog::ALWAYS, PLog::CRITICAL, PLog::DEBUG, PLog::ERROR, PLog::INFO, createReleaseCurl::str, and PLog::WARNING.

Referenced by testStringToLogLevel().

+ Here is the caller graph for this function:
PLog::WARNING
@ WARNING
Definition: PLog.h:33
PLog::CRITICAL
@ CRITICAL
Definition: PLog.h:35
PLog::ERROR
@ ERROR
Definition: PLog.h:34
PLog::DEBUG
@ DEBUG
Definition: PLog.h:31
PLog::ALWAYS
@ ALWAYS
Definition: PLog.h:36
createReleaseCurl.str
str
Definition: createReleaseCurl.py:128
PLog::INFO
@ INFO
Definition: PLog.h:32