Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsLogger.cpp
Go to the documentation of this file.
1 /*
2  *
3  * Filename: WsLogger.cpp
4  *
5  * Description: Abstract class that handles logs
6  *
7  * Created: 02/10/12 15:36:22
8  *
9  * Author: Benoit Daccache, ben.daccache@gmail.com
10  *
11  */
12 
13 #include "WsLogger.h"
14 #include <sstream>
15 using namespace std;
16 
18  m_ss(stringstream::in | stringstream::out)
19 {
20 }
21 
23 {
25 }
26 
27 stringstream& WsLogger::log(int level)
28 {
29  m_level = level;
30  return m_ss;
31 }
32 
std::stringstream & log(int level=1)
append the text to the stream. On each object destruction, the text will be written in the log ...
Definition: WsLogger.cpp:27
std::stringstream m_ss
Definition: WsLogger.h:66
int m_level
Definition: WsLogger.h:67
~WsLogger()
destructor writes the text to the file
Definition: WsLogger.cpp:22
void write(const int &level, const std::string &message)
writes the message to the log file
Definition: WsLogWriter.cpp:64
WsLogger()
constructor
Definition: WsLogger.cpp:17
static WsLogWriter * instance()
returns the instance of the WsLogWriter class. If no instance is existing, a new instance will be ret...
Definition: WsLogWriter.cpp:26