PhoenixMock  1.8.7
Tools to split/merge/print mock used in Phoenix
PLog Class Reference

Phoenix Logger. More...

#include <PLog.h>

Public Types

enum  Level {
  DEBUG = 1, INFO = 2, WARNING = 3, ERROR = 4,
  CRITICAL = 5, ALWAYS = 6
}
 Log level to be used in the logger. More...
 
enum  Mode {
  FILE_ONLY, STRING_ONLY, STDOUT_ONLY, FILE_CAPTURE_STDOUT_STDERR,
  DISABLE
}
 Mode to be used on the logger. More...
 

Public Member Functions

void appendLog (std::stringstream &str)
 Append the log (STRING_ONLY mode) into an other log. More...
 
void clear ()
 Clear the children of the current PLog. More...
 
void close ()
 Close the current PLog and its children. More...
 
const std::string & getFileName () const
 Get the filename of the current log. More...
 
std::ostream & getLog (PLog::Level logLevel=PLog::INFO)
 Write log into the PLog. More...
 
PLoggetLog (size_t threadIndex)
 Get the PLog at given index. More...
 
std::ostream & getLogAlways ()
 Write always message into the PLog. More...
 
std::ostream & getLogCritical ()
 Write critical message into the PLog. More...
 
std::ostream & getLogDebug ()
 Write debug message into the PLog. More...
 
std::ostream & getLogError ()
 Write error message into the PLog. More...
 
std::ofstream & getLogFile ()
 Get the current log file. More...
 
std::ostream & getLogInfo ()
 Write info message into the PLog. More...
 
PLog::Level getLogLevel () const
 Get the log level of the current PLog. More...
 
std::stringstream & getLogString ()
 Get the log string. More...
 
std::ostream & getLogWarning ()
 Write warning message into the PLog. More...
 
PLog::Mode getMode () const
 Get the mode of the current PLog. More...
 
size_t getThreadIndex () const
 Get the thread index of the current PLog. More...
 
bool open ()
 Open the current PLog and its children. More...
 
 PLog ()
 Default constructor of PLog. More...
 
void resize (size_t nbThread)
 Resize the number of cihldren log file. More...
 
void setFileName (const std::string &fileName)
 Set the output filename of the current PLog. More...
 
void setLogLevel (PLog::Level logLevel)
 Set the log level of the current PLog. More...
 
void setMode (PLog::Mode mode)
 Set the mode of the current PLog. More...
 
void setThreadIndex (size_t threadIndex)
 Set the thread index of the current PLog. More...
 
virtual ~PLog ()
 Destructor of PLog. More...
 

Private Member Functions

void allocateStream (std::streambuf *buffer)
 Allocate the stream. More...
 
void initialisationPLog ()
 Initialisation function of the class PLog. More...
 
bool streamOpen ()
 Open the streams. More...
 

Private Attributes

std::string p_fileName
 Output filename of the current PLog. More...
 
bool p_isOpen
 True of the log is opened. More...
 
std::ofstream p_logFile
 Current log file to be used. More...
 
PLog::Level p_logLevel
 Current log level of the PLog (all log greater or equal to the p_logLevel will be logged) More...
 
std::stringstream p_logString
 Log string. More...
 
PLog::Mode p_mode
 Mode of the logger. More...
 
std::ostream * p_nullStream
 Stream used to disable log output. More...
 
std::streambuf * p_oldStdCerrBuffer
 Old std::cerr buffer. More...
 
std::streambuf * p_oldStdCoutBuffer
 Old std::cout buffer. More...
 
std::ostream * p_stream
 Current stream to be used to log things. More...
 
size_t p_threadIndex
 Index of the current thread. More...
 
std::vector< PLog * > p_vecLog
 Vector of sur log file to be used (mainly for multithreaded programs) More...
 

Detailed Description

Phoenix Logger.

Definition at line 19 of file PLog.h.

Member Enumeration Documentation

◆ Level

Log level to be used in the logger.

Enumerator
DEBUG 
INFO 
WARNING 
ERROR 
CRITICAL 
ALWAYS 

Definition at line 30 of file PLog.h.

30  {
31  DEBUG = 1,
32  INFO = 2,
33  WARNING = 3,
34  ERROR = 4,
35  CRITICAL = 5,
36  ALWAYS = 6
37  };

◆ Mode

enum PLog::Mode

Mode to be used on the logger.

Enumerator
FILE_ONLY 
STRING_ONLY 
STDOUT_ONLY 
FILE_CAPTURE_STDOUT_STDERR 
DISABLE 

Definition at line 22 of file PLog.h.

22  {
23  FILE_ONLY,
27  DISABLE
28  };

Constructor & Destructor Documentation

◆ PLog()

PLog::PLog ( )

Default constructor of PLog.

Definition at line 48 of file PLog.cpp.

48  {
50 }

References initialisationPLog().

Referenced by resize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~PLog()

PLog::~PLog ( )
virtual

Destructor of PLog.

Definition at line 53 of file PLog.cpp.

53  {
54  close();
55  clear();
56  delete p_nullStream;
57 }

References clear(), close(), and p_nullStream.

+ Here is the call graph for this function:

Member Function Documentation

◆ allocateStream()

void PLog::allocateStream ( std::streambuf *  buffer)
private

Allocate the stream.

Parameters
buffer: buffer to be used

Definition at line 294 of file PLog.cpp.

294  {
295  if(p_stream != NULL){
296  delete p_stream;
297  }
298  p_stream = new std::ostream(buffer);
299 }

References p_stream.

Referenced by streamOpen().

+ Here is the caller graph for this function:

◆ appendLog()

void PLog::appendLog ( std::stringstream &  str)

Append the log (STRING_ONLY mode) into an other log.

Parameters
str: log string to be appended

Definition at line 170 of file PLog.cpp.

170  {
171  getLog(PLog::ALWAYS) << "Append log" << std::endl << str.str();
172 }

References ALWAYS, getLog(), and createReleaseCurl::str.

Referenced by testStringLogAppend().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear()

void PLog::clear ( )

Clear the children of the current PLog.

Definition at line 155 of file PLog.cpp.

155  {
156  if(p_vecLog.size() != 0lu){
157  for(std::vector<PLog*>::iterator it(p_vecLog.begin()); it != p_vecLog.end(); ++it){
158  PLog* log = *it;
159  if(log != NULL){
160  delete log;
161  }
162  }
163  p_vecLog.clear();
164  }
165 }

References p_vecLog.

Referenced by resize(), and ~PLog().

+ Here is the caller graph for this function:

◆ close()

void PLog::close ( )

Close the current PLog and its children.

Definition at line 125 of file PLog.cpp.

125  {
126  if(p_stream != NULL && p_isOpen){
127  getLogAlways() << "Close Log File at " << phoenix_getDate() << std::endl;
128  }
129  if(p_logFile.is_open()){
130  p_logFile.close();
131  }
132 // if(p_mode == PLog::STRING_ONLY){
133 // p_logString.close();
134 // }
135  if(p_oldStdCerrBuffer != NULL){
136  std::cerr.rdbuf(p_oldStdCerrBuffer); //Let's get back to previous std::cerr buffer
137  }
138  if(p_oldStdCoutBuffer != NULL){
139  std::cout.rdbuf(p_oldStdCoutBuffer); //Let's get back to previous std::cout buffer
140  }
141  if(p_stream != NULL){
142  delete p_stream;
143  p_stream = NULL;
144  }
145  p_isOpen = false;
146  for(std::vector<PLog*>::iterator it(p_vecLog.begin()); it != p_vecLog.end(); ++it){
147  PLog* log = *it;
148  if(log != NULL){
149  log->close();
150  }
151  }
152 }

References close(), getLogAlways(), p_isOpen, p_logFile, p_oldStdCerrBuffer, p_oldStdCoutBuffer, p_stream, p_vecLog, and phoenix_getDate().

Referenced by close(), testLogCoutDedirectInFile(), testLogDisable(), testLogStdoutOnly(), testStringLogAppend(), and ~PLog().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFileName()

const std::string & PLog::getFileName ( ) const

Get the filename of the current log.

Returns
filename of the current log

Definition at line 254 of file PLog.cpp.

254  {
255  return p_fileName;
256 }

References p_fileName.

Referenced by testStringPLog(), and testStringPLogLevel().

+ Here is the caller graph for this function:

◆ getLog() [1/2]

std::ostream & PLog::getLog ( PLog::Level  logLevel = PLog::INFO)

Write log into the PLog.

Parameters
logLevel: log level of the current line
Returns
ofstream to be written

Definition at line 199 of file PLog.cpp.

199  {
200  if(logLevel >= p_logLevel){
201  *p_stream << "[" << phoenix_getTime() << "][" << phoenix_getDateCompact() << "][" << p_threadIndex << "]["<<phoenix_logLevelToStr(logLevel)<<"] : ";
202  return *p_stream;
203  }else{
204  return *p_nullStream;
205  }
206 }

References p_logLevel, p_nullStream, p_stream, p_threadIndex, phoenix_getDateCompact(), phoenix_getTime(), and phoenix_logLevelToStr().

+ Here is the call graph for this function:

◆ getLog() [2/2]

PLog & PLog::getLog ( size_t  threadIndex)

Get the PLog at given index.

Returns
PLog at Index

Definition at line 177 of file PLog.cpp.

177  {
178  return *(p_vecLog[threadIndex]);
179 }

References p_vecLog.

Referenced by appendLog(), getLogAlways(), getLogCritical(), getLogDebug(), getLogError(), getLogInfo(), getLogWarning(), testLogCoutDedirectInFile(), testLogDisable(), testLogStdoutOnly(), testStringLogAppend(), testStringMultiPLog(), testStringPLog(), and testStringPLogLevel().

+ Here is the caller graph for this function:

◆ getLogAlways()

std::ostream & PLog::getLogAlways ( )

Write always message into the PLog.

Returns
ofstream to be written

Definition at line 246 of file PLog.cpp.

246  {
247  return getLog(PLog::ALWAYS);
248 }

References ALWAYS, and getLog().

Referenced by close(), and open().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLogCritical()

std::ostream & PLog::getLogCritical ( )

Write critical message into the PLog.

Returns
ofstream to be written

Definition at line 239 of file PLog.cpp.

239  {
240  return getLog(PLog::CRITICAL);
241 }

References CRITICAL, and getLog().

Referenced by testStringLogAppend(), and testStringPLogLevel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLogDebug()

std::ostream & PLog::getLogDebug ( )

Write debug message into the PLog.

Returns
ofstream to be written

Definition at line 211 of file PLog.cpp.

211  {
212  return getLog(PLog::DEBUG);
213 }

References DEBUG, and getLog().

Referenced by testStringLogAppend(), and testStringPLogLevel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLogError()

std::ostream & PLog::getLogError ( )

Write error message into the PLog.

Returns
ofstream to be written

Definition at line 232 of file PLog.cpp.

232  {
233  return getLog(PLog::ERROR);
234 }

References ERROR, and getLog().

Referenced by testStringLogAppend(), and testStringPLogLevel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLogFile()

std::ofstream & PLog::getLogFile ( )

Get the current log file.

Returns
current log file

Definition at line 184 of file PLog.cpp.

184  {
185  return p_logFile;
186 }

References p_logFile.

◆ getLogInfo()

std::ostream & PLog::getLogInfo ( )

Write info message into the PLog.

Returns
ofstream to be written

Definition at line 218 of file PLog.cpp.

218  {
219  return getLog(PLog::INFO);
220 }

References getLog(), and INFO.

Referenced by testStringLogAppend(), and testStringPLogLevel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLogLevel()

PLog::Level PLog::getLogLevel ( ) const

Get the log level of the current PLog.

Returns
log level of the current PLog

Definition at line 268 of file PLog.cpp.

268  {
269  return p_logLevel;
270 }

References p_logLevel.

Referenced by open().

+ Here is the caller graph for this function:

◆ getLogString()

std::stringstream & PLog::getLogString ( )

Get the log string.

Returns
log string

Definition at line 191 of file PLog.cpp.

191  {
192  return p_logString;
193 }

References p_logString.

Referenced by testStringLogAppend().

+ Here is the caller graph for this function:

◆ getLogWarning()

std::ostream & PLog::getLogWarning ( )

Write warning message into the PLog.

Returns
ofstream to be written

Definition at line 225 of file PLog.cpp.

225  {
226  return getLog(PLog::WARNING);
227 }

References getLog(), and WARNING.

Referenced by testStringLogAppend(), and testStringPLogLevel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMode()

PLog::Mode PLog::getMode ( ) const

Get the mode of the current PLog.

Returns
mode of the current PLog

Definition at line 261 of file PLog.cpp.

261  {
262  return p_mode;
263 }

References p_mode.

◆ getThreadIndex()

size_t PLog::getThreadIndex ( ) const

Get the thread index of the current PLog.

Returns
thread index of the current PLog

Definition at line 275 of file PLog.cpp.

275  {
276  return p_threadIndex;
277 }

References p_threadIndex.

Referenced by testStringPLog().

+ Here is the caller graph for this function:

◆ initialisationPLog()

void PLog::initialisationPLog ( )
private

Initialisation function of the class PLog.

Definition at line 280 of file PLog.cpp.

280  {
283  p_oldStdCerrBuffer = NULL;
284  p_oldStdCoutBuffer = NULL;
285  p_isOpen = false;
286  p_stream = NULL;
287  p_nullStream = new std::ostream(NULL);
288  p_threadIndex = 0lu;
289 }

References FILE_ONLY, INFO, p_isOpen, p_logLevel, p_mode, p_nullStream, p_oldStdCerrBuffer, p_oldStdCoutBuffer, p_stream, and p_threadIndex.

Referenced by PLog().

+ Here is the caller graph for this function:

◆ open()

bool PLog::open ( )

Open the current PLog and its children.

Returns
true on success, false otherwise

Definition at line 106 of file PLog.cpp.

106  {
107  bool b(true);
108  b &= streamOpen();
109  p_isOpen = b;
110  if(b){
111  getLogAlways() << "[UTC][Date][ThreadIndex][LogLevel] : log message" << std::endl;
112  getLogAlways() << "Start logging at " << phoenix_getDate() << std::endl;
113  getLogAlways() << "Current logging level '"<<phoenix_logLevelToStr(getLogLevel())<<"'" << std::endl;
114  }
115  for(std::vector<PLog*>::iterator it(p_vecLog.begin()); it != p_vecLog.end(); ++it){
116  PLog* log = *it;
117  if(log != NULL){
118  b &= log->open();
119  }
120  }
121  return b;
122 }

References getLogAlways(), getLogLevel(), open(), p_isOpen, p_vecLog, phoenix_getDate(), phoenix_logLevelToStr(), and streamOpen().

Referenced by open(), testLogCoutDedirectInFile(), testLogDisable(), testLogStdoutOnly(), testStringLogAppend(), testStringMultiPLog(), testStringPLog(), and testStringPLogLevel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resize()

void PLog::resize ( size_t  nbThread)

Resize the number of cihldren log file.

Parameters
nbThread: number of sub log files to be created (typically the number of threads of a program)

Definition at line 90 of file PLog.cpp.

90  {
91  clear();
92  p_vecLog.resize(nbThread);
93  std::string baseFileName(eraseExtension(p_fileName));
94  std::string extention(getExtention(p_fileName));
95  for(size_t i(0lu); i < nbThread; ++i){
96  p_vecLog[i] = new PLog;
97  p_vecLog[i]->setFileName(baseFileName + "_" + convertToString(i) + "." + extention);
98  p_vecLog[i]->setMode(p_mode);
99  p_vecLog[i]->setLogLevel(p_logLevel);
100  }
101 }

References clear(), convertToString(), eraseExtension(), getExtention(), p_fileName, p_logLevel, p_mode, p_vecLog, and PLog().

Referenced by testStringMultiPLog().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFileName()

void PLog::setFileName ( const std::string &  fileName)

Set the output filename of the current PLog.

Parameters
fileName: output filename of the current PLog

Definition at line 62 of file PLog.cpp.

62  {
63  p_fileName = fileName;
64 }

References p_fileName.

Referenced by testLogCoutDedirectInFile(), testLogDisable(), testLogStdoutOnly(), testStringLogAppend(), testStringMultiPLog(), testStringPLog(), and testStringPLogLevel().

+ Here is the caller graph for this function:

◆ setLogLevel()

void PLog::setLogLevel ( PLog::Level  logLevel)

Set the log level of the current PLog.

Parameters
logLevel: log level of the current PLog

Definition at line 76 of file PLog.cpp.

76  {
77  p_logLevel = logLevel;
78 }

References p_logLevel.

Referenced by testStringLogAppend(), and testStringPLogLevel().

+ Here is the caller graph for this function:

◆ setMode()

void PLog::setMode ( PLog::Mode  mode)

Set the mode of the current PLog.

Parameters
mode: mode of the current PLog

Definition at line 69 of file PLog.cpp.

69  {
70  p_mode = mode;
71 }

References p_mode.

Referenced by testLogCoutDedirectInFile(), testLogDisable(), testLogStdoutOnly(), and testStringLogAppend().

+ Here is the caller graph for this function:

◆ setThreadIndex()

void PLog::setThreadIndex ( size_t  threadIndex)

Set the thread index of the current PLog.

Parameters
threadIndex: thread index of the current PLog

Definition at line 83 of file PLog.cpp.

83  {
84  p_threadIndex = threadIndex;
85 }

References p_threadIndex.

Referenced by testStringLogAppend(), and testStringPLog().

+ Here is the caller graph for this function:

◆ streamOpen()

bool PLog::streamOpen ( )
private

Open the streams.

Returns
true on success, false otherwise

Definition at line 304 of file PLog.cpp.

304  {
305  bool b(true);
306  if(p_mode == PLog::FILE_ONLY){
307  p_logFile.open(p_fileName);
308  b &= p_logFile.is_open();
309  if(b){
310  allocateStream(p_logFile.rdbuf());
311  }
312  }else if(p_mode == PLog::STRING_ONLY){
313  std::cerr << "PLog::streamOpen : p_logString.rdbuf() = " << p_logString.rdbuf() << std::endl;
314  allocateStream(p_logString.rdbuf());
316  p_logFile.open(p_fileName);
317  b &= p_logFile.is_open();
318  if(b){
319  p_oldStdCerrBuffer = std::cerr.rdbuf(p_logFile.rdbuf());
320  p_oldStdCoutBuffer = std::cout.rdbuf(p_logFile.rdbuf());
321  allocateStream(p_logFile.rdbuf());
322  }
323  }else if(p_mode == PLog::STDOUT_ONLY){
324  allocateStream(std::cout.rdbuf());
325  }else if(p_mode == PLog::DISABLE){
326  allocateStream(NULL);
327  }
328  return b;
329 }

References allocateStream(), DISABLE, FILE_CAPTURE_STDOUT_STDERR, FILE_ONLY, p_fileName, p_logFile, p_logString, p_mode, p_oldStdCerrBuffer, p_oldStdCoutBuffer, STDOUT_ONLY, and STRING_ONLY.

Referenced by open().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ p_fileName

std::string PLog::p_fileName
private

Output filename of the current PLog.

Definition at line 77 of file PLog.h.

Referenced by getFileName(), resize(), setFileName(), and streamOpen().

◆ p_isOpen

bool PLog::p_isOpen
private

True of the log is opened.

Definition at line 93 of file PLog.h.

Referenced by close(), initialisationPLog(), and open().

◆ p_logFile

std::ofstream PLog::p_logFile
private

Current log file to be used.

Definition at line 79 of file PLog.h.

Referenced by close(), getLogFile(), and streamOpen().

◆ p_logLevel

PLog::Level PLog::p_logLevel
private

Current log level of the PLog (all log greater or equal to the p_logLevel will be logged)

Definition at line 75 of file PLog.h.

Referenced by getLog(), getLogLevel(), initialisationPLog(), resize(), and setLogLevel().

◆ p_logString

std::stringstream PLog::p_logString
private

Log string.

Definition at line 81 of file PLog.h.

Referenced by getLogString(), and streamOpen().

◆ p_mode

PLog::Mode PLog::p_mode
private

Mode of the logger.

Definition at line 73 of file PLog.h.

Referenced by getMode(), initialisationPLog(), resize(), setMode(), and streamOpen().

◆ p_nullStream

std::ostream* PLog::p_nullStream
private

Stream used to disable log output.

Definition at line 85 of file PLog.h.

Referenced by getLog(), initialisationPLog(), and ~PLog().

◆ p_oldStdCerrBuffer

std::streambuf* PLog::p_oldStdCerrBuffer
private

Old std::cerr buffer.

Definition at line 87 of file PLog.h.

Referenced by close(), initialisationPLog(), and streamOpen().

◆ p_oldStdCoutBuffer

std::streambuf* PLog::p_oldStdCoutBuffer
private

Old std::cout buffer.

Definition at line 89 of file PLog.h.

Referenced by close(), initialisationPLog(), and streamOpen().

◆ p_stream

std::ostream* PLog::p_stream
private

Current stream to be used to log things.

Definition at line 83 of file PLog.h.

Referenced by allocateStream(), close(), getLog(), and initialisationPLog().

◆ p_threadIndex

size_t PLog::p_threadIndex
private

Index of the current thread.

Definition at line 95 of file PLog.h.

Referenced by getLog(), getThreadIndex(), initialisationPLog(), and setThreadIndex().

◆ p_vecLog

std::vector<PLog*> PLog::p_vecLog
private

Vector of sur log file to be used (mainly for multithreaded programs)

Definition at line 91 of file PLog.h.

Referenced by clear(), close(), getLog(), open(), and resize().


The documentation for this class was generated from the following files:
convertToString
std::string convertToString(const T &val)
Convert a type into a string.
Definition: convertToString_impl.h:17
PLog::getLog
PLog & getLog(size_t threadIndex)
Get the PLog at given index.
Definition: PLog.cpp:177
PLog::WARNING
@ WARNING
Definition: PLog.h:33
PLog::initialisationPLog
void initialisationPLog()
Initialisation function of the class PLog.
Definition: PLog.cpp:280
PLog::STDOUT_ONLY
@ STDOUT_ONLY
Definition: PLog.h:25
PLog::CRITICAL
@ CRITICAL
Definition: PLog.h:35
PLog::ERROR
@ ERROR
Definition: PLog.h:34
PLog::DEBUG
@ DEBUG
Definition: PLog.h:31
PLog::allocateStream
void allocateStream(std::streambuf *buffer)
Allocate the stream.
Definition: PLog.cpp:294
PLog::close
void close()
Close the current PLog and its children.
Definition: PLog.cpp:125
PLog::getLogAlways
std::ostream & getLogAlways()
Write always message into the PLog.
Definition: PLog.cpp:246
phoenix_logLevelToStr
std::string phoenix_logLevelToStr(PLog::Level logLevel)
Convert the log level into a string.
Definition: PLog.cpp:17
PLog::FILE_CAPTURE_STDOUT_STDERR
@ FILE_CAPTURE_STDOUT_STDERR
Definition: PLog.h:26
PLog::p_logFile
std::ofstream p_logFile
Current log file to be used.
Definition: PLog.h:79
PLog::p_isOpen
bool p_isOpen
True of the log is opened.
Definition: PLog.h:93
PLog::clear
void clear()
Clear the children of the current PLog.
Definition: PLog.cpp:155
PLog::getLogLevel
PLog::Level getLogLevel() const
Get the log level of the current PLog.
Definition: PLog.cpp:268
PLog::p_oldStdCoutBuffer
std::streambuf * p_oldStdCoutBuffer
Old std::cout buffer.
Definition: PLog.h:89
PLog::p_stream
std::ostream * p_stream
Current stream to be used to log things.
Definition: PLog.h:83
PLog::open
bool open()
Open the current PLog and its children.
Definition: PLog.cpp:106
PLog::streamOpen
bool streamOpen()
Open the streams.
Definition: PLog.cpp:304
eraseExtension
std::string eraseExtension(const std::string &fileName)
Erase extention of the given file.
Definition: string_filename.cpp:368
PLog::p_fileName
std::string p_fileName
Output filename of the current PLog.
Definition: PLog.h:77
PLog::STRING_ONLY
@ STRING_ONLY
Definition: PLog.h:24
PLog::ALWAYS
@ ALWAYS
Definition: PLog.h:36
PLog::p_nullStream
std::ostream * p_nullStream
Stream used to disable log output.
Definition: PLog.h:85
PLog::p_vecLog
std::vector< PLog * > p_vecLog
Vector of sur log file to be used (mainly for multithreaded programs)
Definition: PLog.h:91
phoenix_getTime
time_t phoenix_getTime()
Get the current time of the program.
Definition: string_system.cpp:445
PLog::FILE_ONLY
@ FILE_ONLY
Definition: PLog.h:23
createReleaseCurl.str
str
Definition: createReleaseCurl.py:128
PLog::DISABLE
@ DISABLE
Definition: PLog.h:27
PLog::p_oldStdCerrBuffer
std::streambuf * p_oldStdCerrBuffer
Old std::cerr buffer.
Definition: PLog.h:87
phoenix_getDateCompact
std::string phoenix_getDateCompact()
Get the current date.
Definition: string_system.cpp:463
phoenix_getDate
std::string phoenix_getDate()
Get the current date.
Definition: string_system.cpp:452
PLog
Phoenix Logger.
Definition: PLog.h:19
PLog::p_logLevel
PLog::Level p_logLevel
Current log level of the PLog (all log greater or equal to the p_logLevel will be logged)
Definition: PLog.h:75
PLog::p_threadIndex
size_t p_threadIndex
Index of the current thread.
Definition: PLog.h:95
getExtention
std::string getExtention(const std::string &fileName)
Get file extention.
Definition: string_filename.cpp:326
PLog::p_logString
std::stringstream p_logString
Log string.
Definition: PLog.h:81
PLog::p_mode
PLog::Mode p_mode
Mode of the logger.
Definition: PLog.h:73
PLog::INFO
@ INFO
Definition: PLog.h:32
PLog::PLog
PLog()
Default constructor of PLog.
Definition: PLog.cpp:48