mirror of
https://github.com/debauchee/barrier.git
synced 2025-08-06 10:09:28 +02:00
Some work toward Issue 27 and Issue 319
This commit is contained in:
parent
fea12827d4
commit
f974d8d680
74 changed files with 4057 additions and 3756 deletions
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "LogOutputters.h"
|
||||
#include "CArch.h"
|
||||
#include "TMethodJob.h"
|
||||
|
||||
#include <fstream>
|
||||
//
|
||||
|
@ -54,12 +55,6 @@ CStopLogOutputter::write(ELevel, const char*)
|
|||
return false;
|
||||
}
|
||||
|
||||
const char*
|
||||
CStopLogOutputter::getNewline() const
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CConsoleLogOutputter
|
||||
|
@ -67,12 +62,10 @@ CStopLogOutputter::getNewline() const
|
|||
|
||||
CConsoleLogOutputter::CConsoleLogOutputter()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
CConsoleLogOutputter::~CConsoleLogOutputter()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -94,16 +87,16 @@ CConsoleLogOutputter::show(bool showIfEmpty)
|
|||
}
|
||||
|
||||
bool
|
||||
CConsoleLogOutputter::write(ELevel, const char* msg)
|
||||
CConsoleLogOutputter::write(ELevel level, const char* msg)
|
||||
{
|
||||
ARCH->writeConsole(msg);
|
||||
return true;
|
||||
return true; // wtf?
|
||||
}
|
||||
|
||||
const char*
|
||||
CConsoleLogOutputter::getNewline() const
|
||||
void
|
||||
CConsoleLogOutputter::flush()
|
||||
{
|
||||
return ARCH->getNewlineForConsole();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -170,13 +163,6 @@ CSystemLogOutputter::write(ELevel level, const char* msg)
|
|||
return true;
|
||||
}
|
||||
|
||||
const char*
|
||||
CSystemLogOutputter::getNewline() const
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CSystemLogger
|
||||
//
|
||||
|
@ -261,12 +247,6 @@ CBufferedLogOutputter::write(ELevel, const char* message)
|
|||
return true;
|
||||
}
|
||||
|
||||
const char*
|
||||
CBufferedLogOutputter::getNewline() const
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CFileLogOutputter
|
||||
|
@ -287,17 +267,11 @@ CFileLogOutputter::~CFileLogOutputter()
|
|||
m_handle.close();
|
||||
}
|
||||
|
||||
const char*
|
||||
CFileLogOutputter::getNewline() const
|
||||
{
|
||||
return "\n";
|
||||
}
|
||||
|
||||
bool
|
||||
CFileLogOutputter::write(ILogOutputter::ELevel level, const char *message)
|
||||
{
|
||||
if (m_handle.is_open() && m_handle.fail() != true) {
|
||||
m_handle << message;
|
||||
m_handle << message << std::endl;
|
||||
|
||||
// write buffer to file
|
||||
m_handle.flush();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue