Skip to content

Commit 96a04b7

Browse files
committed
测试将日志查看操作记录到日志中
1 parent cb81ad0 commit 96a04b7

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

软件系统服务端模版/Form1.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,38 +432,46 @@ private void DataProcessingWithStartB(AsyncStateBase object1, string object2)
432432
if (headCode == CommonHeadCode.SimplifyHeadCode.网络日志查看)
433433
{
434434
net_simplify_server.SendMessage(object1, net_socket_server.LogHelper.GetLogText());
435+
RuntimeLogHelper.SaveInformation("网络日志查看");
435436
}
436437
else if (headCode == CommonHeadCode.SimplifyHeadCode.网络日志清空)
437438
{
438439
net_socket_server.LogHelper.ClearLogText();
439440
net_simplify_server.SendMessage(object1, "成功");
441+
RuntimeLogHelper.SaveWarnning("网络日志清空");
440442
}
441443
else if (headCode == CommonHeadCode.SimplifyHeadCode.同步日志查看)
442444
{
443445
net_simplify_server.SendMessage(object1, net_simplify_server.LogHelper.GetLogText());
446+
RuntimeLogHelper.SaveInformation("同步日志查看");
444447
}
445448
else if (headCode == CommonHeadCode.SimplifyHeadCode.同步日志清空)
446449
{
447450
net_simplify_server.LogHelper.ClearLogText();
448451
net_simplify_server.SendMessage(object1, "成功");
452+
RuntimeLogHelper.SaveWarnning("同步日志清空");
449453
}
450454
else if (headCode == CommonHeadCode.SimplifyHeadCode.更新日志查看)
451455
{
452456
net_simplify_server.SendMessage(object1, net_soft_update_Server.LogHelper.GetLogText());
457+
RuntimeLogHelper.SaveInformation("更新日志查看");
453458
}
454459
else if (headCode == CommonHeadCode.SimplifyHeadCode.更新日志清空)
455460
{
456461
net_soft_update_Server.LogHelper.ClearLogText();
457462
net_simplify_server.SendMessage(object1, "成功");
463+
RuntimeLogHelper.SaveWarnning("更新日志清空");
458464
}
459465
else if (headCode == CommonHeadCode.SimplifyHeadCode.运行日志查看)
460466
{
461467
net_simplify_server.SendMessage(object1, RuntimeLogHelper.GetLogText());
468+
RuntimeLogHelper.SaveInformation("运行日志查看");
462469
}
463470
else if (headCode == CommonHeadCode.SimplifyHeadCode.运行日志清空)
464471
{
465472
RuntimeLogHelper.ClearLogText();
466473
net_simplify_server.SendMessage(object1, "成功");
474+
RuntimeLogHelper.SaveInformation("运行日志清空");
467475
}
468476
else
469477
{
@@ -751,7 +759,14 @@ private void OrderInitialization()
751759
#endregion
752760

753761

754-
762+
/*********************************************************************************************************
763+
*
764+
* 说明 日志的使用方式分为4个等级,1.普通 2.信息 3.警告 4.错误 对应的调用方法不一致
765+
* 具体 如果想要调用存储[信息]等级日志,调用 RuntimeLogHelper.SaveInformation("等待存储的信息")
766+
* 大小 调用10000次存储信息后,日志文件大小在200K左右,需要手动进行情况日志
767+
* 注意 在存储信息时不要带有'['和']'这两个字符,会影响日志筛选时的准确性
768+
*
769+
**********************************************************************************************************/
755770

756771
/// <summary>
757772
/// 用来记录一般的事物日志

0 commit comments

Comments
 (0)