Skip to content

Commit cf3c716

Browse files
committed
added:set color for key log
1 parent 1331ada commit cf3c716

File tree

2 files changed

+68
-61
lines changed

2 files changed

+68
-61
lines changed
Lines changed: 63 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,79 @@
11
{
2-
"nTCPPort":5300,
3-
"nWSPort":5301,
4-
"nHTTPPort":5302,
5-
"bDeamon":false,
6-
"bTimeNotify":false,
7-
"XMax":{
8-
"nMaxClient":10000,
9-
"nMaxQueue":10000,
10-
"nIOThread":2,
11-
"nTCPThread":2,
12-
"nWSThread":2,
13-
"nHTTPThread":2
2+
"nTCPPort": 5300,
3+
"nWSPort": 5301,
4+
"nHTTPPort": 5302,
5+
"bDeamon": false,
6+
"bTimeNotify": false,
7+
"XMax": {
8+
"nMaxClient": 10000,
9+
"nMaxQueue": 10000,
10+
"nIOThread": 2,
11+
"nTCPThread": 2,
12+
"nWSThread": 2,
13+
"nHTTPThread": 2
1414
},
15-
"XTime":{
16-
"nHeartCheck":3,
17-
"nTCPTime":5,
18-
"nWSTime":5,
19-
"nHTTPTime":5
15+
"XTime": {
16+
"nHeartCheck": 3,
17+
"nTCPTime": 5,
18+
"nWSTime": 5,
19+
"nHTTPTime": 5
2020
},
21-
"XVerification":{
22-
"nTokenTimeout":3600,
23-
"nDynamicTimeout":30,
24-
"nVerTime":5,
25-
"nVerMode":2,
26-
"nTryTime":30,
27-
"nTryMode":1,
28-
"st_XCDKey":{
29-
"tszKeyFile":"./APPVer.key",
30-
"tszKeyPass":"123123qa"
21+
"XVerification": {
22+
"nTokenTimeout": 3600,
23+
"nDynamicTimeout": 30,
24+
"nVerTime": 5,
25+
"nVerMode": 2,
26+
"nTryTime": 30,
27+
"nTryMode": 1,
28+
"st_XCDKey": {
29+
"tszKeyFile": "./APPVer.key",
30+
"tszKeyPass": "123123qa"
3131
},
32-
"st_XToken":{
33-
"bAutoRenewal":false,
34-
"nRenewalTime":-1
35-
}
32+
"st_XToken": {
33+
"bAutoRenewal": false,
34+
"nRenewalTime": -1
35+
}
3636
},
37-
"XLogin":{
38-
"bHTTPAuth":false,
39-
"bPassAuth":false,
40-
"nMultiMode":0,
41-
"st_PassUrl":{
42-
"tszPassLogin":"http://127.0.0.1:5303/auth/pass/login",
43-
"tszPassLogout":"http://127.0.0.1:5303/auth/pass/logout",
44-
"tszPassTimeout":"http://127.0.0.1:5303/auth/pass/timeout"
37+
"XLogin": {
38+
"bHTTPAuth": false,
39+
"bPassAuth": false,
40+
"nMultiMode": 0,
41+
"st_PassUrl": {
42+
"tszPassLogin": "http://127.0.0.1:5303/auth/pass/login",
43+
"tszPassLogout": "http://127.0.0.1:5303/auth/pass/logout",
44+
"tszPassTimeout": "http://127.0.0.1:5303/auth/pass/timeout"
4545
},
46-
"st_MulitLogin":{
47-
"bSecond":true,
48-
"bTime":true,
49-
"bDay":true,
50-
"bCustom":false
46+
"st_MulitLogin": {
47+
"bSecond": true,
48+
"bTime": true,
49+
"bDay": true,
50+
"bCustom": false
5151
}
5252
},
53-
"XCrypto":{
54-
"bEnable":false,
55-
"nPass":123123
53+
"XCrypto": {
54+
"bEnable": false,
55+
"nPass": 123123
5656
},
57-
"XSql":{
58-
"nSQLType":0,
57+
"XSql": {
58+
"nSQLType": 0,
5959
"SQLAddr": "127.0.0.1",
6060
"SQLPort": 3306,
6161
"SQLUser": "root",
6262
"SQLPass": "123123",
63-
"SQLFile":"./XEngine_DataBase/SQL_User.db"
63+
"SQLFile": "./XEngine_DataBase/SQL_User.db"
6464
},
65-
"XLog":{
66-
"tszLogFile":"./XEngine_XLog/XEngine_Authorize.log",
67-
"MaxSize":1024000,
68-
"MaxCount":10,
69-
"LogLeave":32,
70-
"nLogType":17
65+
"XLog": {
66+
"tszLogFile": "./XEngine_XLog/XEngine_Authorize.log",
67+
"tszKeyFile": "./XEngine_XLog/Storage/Key.log",
68+
"MaxSize": 1024000,
69+
"MaxCount": 10,
70+
"LogLeave": 32,
71+
"nLogType": 17,
72+
"bLogStorage": true
7173
},
72-
"XReport":{
73-
"bEnable":true,
74-
"tszServiceName":"XEngine_Authorize",
75-
"tszAPIUrl":"http://app.xyry.org:5501/api?function=machine"
74+
"XReport": {
75+
"bEnable": true,
76+
"tszServiceName": "XEngine_Authorize",
77+
"tszAPIUrl": "http://app.xyry.org:5501/api?function=machine"
7678
}
77-
}
79+
}

XEngine_Source/XEngine_APPService/XEngine_AuthorizeService/XEngine_AuthorizeService.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ int main(int argc, char** argv)
168168
{
169169
HelpComponents_XLog_StrongOPen(xhLog, st_AuthConfig.st_XLog.tszKeyFile, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_NOTICE);
170170
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化关键日志存储功能成功..."));
171+
172+
HELPCOMPONENTS_XLOG_COLOR st_XLogColor = {};
173+
st_XLogColor.wNotice = XENGINE_HELPCOMPONENTS_XLOG_TEXT_RED;
174+
HelpComponents_XLog_SetLogColor(xhLog, &st_XLogColor);
175+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化关键日志输出颜色成功..."));
171176
}
172177
if (st_AuthConfig.bDeamon)
173178
{

0 commit comments

Comments
 (0)