wip
This commit is contained in:
1 parent
062f9c8c69
commit
2fedb29014
3 files changed
+17
-9
No files matched your search
+7
-2
@@ -12,8 +12,8 @@ using std::endl;
|
||||
Logger::Logger(enum Level logLevel) :
|
||||
_logLevel(logLevel),
|
||||
debug(DEBUG, *this),
|
||||
info(INFO, *this),
|
||||
warn(WARN, *this),
|
||||
info (INFO, *this),
|
||||
warn (WARN, *this),
|
||||
fatal(FATAL, *this)
|
||||
{
|
||||
_output = new ofstream("plains.log", std::ios_base::app);
|
||||
@@ -106,6 +106,7 @@ Logger::Sink& Logger::Sink::operator<<(const string& msg) {
|
||||
if ( _level >= _parent._logLevel ) {
|
||||
prefixLine();
|
||||
*_parent._output << msg;
|
||||
cout << msg;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -114,6 +115,7 @@ Logger::Sink& Logger::Sink::operator<<(const char* msg) {
|
||||
if ( _level >= _parent._logLevel ) {
|
||||
prefixLine();
|
||||
*_parent._output << msg;
|
||||
cout << msg;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -122,6 +124,7 @@ Logger::Sink& Logger::Sink::operator<<(const int msg) {
|
||||
if ( _level >= _parent._logLevel ) {
|
||||
prefixLine();
|
||||
*_parent._output << msg;
|
||||
cout << msg;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -130,6 +133,7 @@ Logger::Sink& Logger::Sink::operator<<(const long msg) {
|
||||
if ( _level >= _parent._logLevel ) {
|
||||
prefixLine();
|
||||
*_parent._output << msg;
|
||||
cout << msg;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -138,6 +142,7 @@ Logger::Sink& Logger::Sink::operator<<(const unsigned long msg) {
|
||||
if ( _level >= _parent._logLevel ) {
|
||||
prefixLine();
|
||||
*_parent._output << msg;
|
||||
cout << msg;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user