-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLogMgr.cpp
More file actions
53 lines (43 loc) · 812 Bytes
/
LogMgr.cpp
File metadata and controls
53 lines (43 loc) · 812 Bytes
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
#include "stdafx.h"
#include "LogMgr.h"
#include "TimeTicker.h"
//LogMgr* LogMgr::m_pInstnace = nullptr;
LogMgr::LogMgr()
{
}
LogMgr::~LogMgr()
{
}
//LogMgr* LogMgr::getInstance()
//{
// if ( m_pInstnace == nullptr )
// {
// m_pInstnace = new LogMgr;
// }
// return m_pInstnace;
//}
//
//void LogMgr::release()
//{
// if ( m_pInstnace != nullptr )
// {
// delete m_pInstnace;
// m_pInstnace = nullptr;
// }
//}
void LogMgr::start( void )
{
isRunning = true;
}
void LogMgr::stop( void )
{
isRunning = false;
}
void LogMgr::push_log( std::string& strModuleName,std::string& strLog )
{
PLOG_STRUCT pLogStruct = new LOG_STRUCT;
pLogStruct->moduleName = strModuleName;
pLogStruct->time = TimeTicker::GetInstance()->getCurrentTimeStr();
pLogStruct->logStr = strLog;
m_lockList.push( pLogStruct );
}