Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
jlib
Commits
559b2c8e
Commit
559b2c8e
authored
Dec 07, 2015
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ready to upgrade
parent
9bd97ff8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
Log.h
Log.h
+21
-10
No files found.
Log.h
View file @
559b2c8e
...
@@ -57,6 +57,7 @@ namespace jlib
...
@@ -57,6 +57,7 @@ namespace jlib
class
CLog
class
CLog
{
{
private
:
private
:
#pragma region private members
double
exe_time
;
double
exe_time
;
LARGE_INTEGER
freq
;
LARGE_INTEGER
freq
;
LARGE_INTEGER
start_t
,
stop_t
;
LARGE_INTEGER
start_t
,
stop_t
;
...
@@ -75,17 +76,12 @@ namespace jlib
...
@@ -75,17 +76,12 @@ namespace jlib
static
char
m_ansiBuf
[
MAX_OUTPUT_LEN
];
static
char
m_ansiBuf
[
MAX_OUTPUT_LEN
];
static
wchar_t
m_utf16Buf
[
MAX_OUTPUT_LEN
];
static
wchar_t
m_utf16Buf
[
MAX_OUTPUT_LEN
];
static
CLog
*
m_pInstance
;
static
CLog
*
m_pInstance
;
#pragma endregion
public
:
public
:
static
const
wchar_t
*
GetPrivateLogPath
()
#pragma region public functions
{
static
wchar_t
strPrivateMapFolder
[
1024
]
=
{
0
};
static
const
wchar_t
*
GetLogFilePath
()
{
return
g_szFileName
;
}
static
BOOL
b
=
TRUE
;
if
(
b
)
{
wsprintf
(
strPrivateMapFolder
,
_T
(
"%s
\\
Log"
),
GetModuleFilePath
());
b
=
FALSE
;
}
return
strPrivateMapFolder
;
}
static
CLog
*
GetInstance
()
static
CLog
*
GetInstance
()
{
{
...
@@ -313,7 +309,10 @@ namespace jlib
...
@@ -313,7 +309,10 @@ namespace jlib
}
}
}
}
#pragma endregion
protected
:
protected
:
#pragma region protected functions
CLog
()
:
m_pLogFile
(
NULL
),
m_bOutputLogFile
(
FALSE
),
m_bOutputDbgView
(
FALSE
),
CLog
()
:
m_pLogFile
(
NULL
),
m_bOutputLogFile
(
FALSE
),
m_bOutputDbgView
(
FALSE
),
m_bOutputConsole
(
FALSE
),
m_bConsoleOpened
(
FALSE
),
m_bDbgviewOpened
(
FALSE
),
m_bOutputConsole
(
FALSE
),
m_bConsoleOpened
(
FALSE
),
m_bDbgviewOpened
(
FALSE
),
m_bLogFileOpened
(
FALSE
),
m_bRunning
(
TRUE
)
m_bLogFileOpened
(
FALSE
),
m_bRunning
(
TRUE
)
...
@@ -348,6 +347,17 @@ namespace jlib
...
@@ -348,6 +347,17 @@ namespace jlib
return
szTime
;
return
szTime
;
}
}
static
const
wchar_t
*
GetPrivateLogPath
()
{
static
wchar_t
strPrivateMapFolder
[
1024
]
=
{
0
};
static
BOOL
b
=
TRUE
;
if
(
b
)
{
wsprintf
(
strPrivateMapFolder
,
_T
(
"%s
\\
Log"
),
GetModuleFilePath
());
b
=
FALSE
;
}
return
strPrivateMapFolder
;
}
void
Output
(
const
TCHAR
*
out
)
void
Output
(
const
TCHAR
*
out
)
{
{
if
(
m_bOutputLogFile
)
{
if
(
m_bOutputLogFile
)
{
...
@@ -527,6 +537,7 @@ namespace jlib
...
@@ -527,6 +537,7 @@ namespace jlib
}
}
};
};
#pragma endregion
};
};
//CRITICAL_SECTION CLog::m_cs;
//CRITICAL_SECTION CLog::m_cs;
//int CLog::m_nRef = 0;
//int CLog::m_nRef = 0;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment