2013-12-10 08:00:13 -05:00
|
|
|
#include "Log.h"
|
|
|
|
|
2014-04-23 02:10:21 +04:00
|
|
|
#include "Daemon.h"
|
|
|
|
|
2014-04-23 12:49:02 -04:00
|
|
|
Log g_Log;
|
2014-04-23 02:10:21 +04:00
|
|
|
|
|
|
|
void LogMsg::Process()
|
|
|
|
{
|
|
|
|
if (Daemon.isLogging == 1 && Daemon.logfile.is_open())
|
|
|
|
Daemon.logfile << s.str();
|
2014-04-23 12:49:02 -04:00
|
|
|
|
2014-04-23 02:10:21 +04:00
|
|
|
output << s.str();
|
2014-04-23 12:49:02 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Log::Flush ()
|
|
|
|
{
|
|
|
|
if (Daemon.isLogging == 1 && Daemon.logfile.is_open())
|
|
|
|
Daemon.logfile.flush();
|
|
|
|
}
|
|
|
|
|