-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
66 lines (52 loc) · 1.15 KB
/
Copy pathMain.cpp
File metadata and controls
66 lines (52 loc) · 1.15 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
#include "Utils/Logger.h"
#include "Utils/LogMgr.h"
#include "Utils/GlobalConfig.h"
#include "Utils/DataDictionary.h"
#include "Utils/DataItem.h"
#include "Utils/StringUtils.h"
#include "Utils/Singleton.h"
#include "Utils/ThreadPool.h"
#include "Utils/Program.h"
#include <iostream>
#include <memory>
#include <stdexcept>
using Utils::Logger;
using Utils::LogMgr;
using Utils::GlobalConfig;
using Utils::DataDictionary;
using Utils::DataItem;
using Utils::StringUtils;
using Utils::Program;
const std::string LogFile1 = "dupa.log";
const std::string ID1 = "dupa1";
const std::string HEAD = "Program::Main()";
class Test : public Program
{
public:
Test(int argc, char** argv) :
Program(argc, argv)
{
}
void onLoad()
{
LogMgr::turnOnDebugLogs();
auto& log = LogMgr::cout();
log.info(HEAD, "starting up");
}
void onStart()
{
auto& log = LogMgr::cout();
log.info(HEAD, "running");
}
void onTerminate()
{
auto& log = LogMgr::cout();
log.info(HEAD, "terminating");
}
};
int main(int argc, char** argv)
{
Test t{argc, argv};
t.start();
return 0;
}