-
Notifications
You must be signed in to change notification settings - Fork 6
/
NovacProgramLog.cpp
51 lines (43 loc) · 1.1 KB
/
NovacProgramLog.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "stdafx.h"
#include "NovacProgramLog.h"
#include "Common/Common.h"
#include <sstream>
NovacProgramLog::NovacProgramLog()
{
}
static void Output(const char* level, std::string message)
{
std::stringstream s;
s << level << message << std::endl;
ShowMessage(s.str());
}
static void Output(const char* level, const novac::LogContext& c, std::string message)
{
std::stringstream s;
s << level << c << message << std::endl;
ShowMessage(s.str());
}
void NovacProgramLog::Debug(const std::string& message)
{
Output("[Debug] ", message);
}
void NovacProgramLog::Debug(const novac::LogContext& c, const std::string& message)
{
Output("[Debug] ", c, message);
}
void NovacProgramLog::Information(const std::string& message)
{
Output("", message);
}
void NovacProgramLog::Information(const novac::LogContext& c, const std::string& message)
{
Output("", c, message);
}
void NovacProgramLog::Error(const std::string& message)
{
Output("[Error] ", message);
}
void NovacProgramLog::Error(const novac::LogContext& c, const std::string& message)
{
Output("[Error] ", c, message);
}