添加日志

This commit is contained in:
zpc 2024-07-09 20:12:17 +08:00
parent 4095c3c4a8
commit d44f364924
2 changed files with 4 additions and 4 deletions

View File

@ -42,8 +42,8 @@ namespace CodeRelease.BLL
// 绑定输出和错误数据接收事件
process.OutputDataReceived += new DataReceivedEventHandler((sender, e) =>
{
Log.Logger.Information($"linux执行出错OutputDataReceived命令{command}");
Log.Logger.Information($"linux执行出错OutputDataReceivedOutput{JsonConvert.SerializeObject(e)}" );
//Log.Logger.Information($"linux执行出错OutputDataReceived命令{command}");
Log.Logger.Information($"linux执行出错OutputDataReceivedOutput{JsonConvert.SerializeObject(e)}");
if (!string.IsNullOrEmpty(e.Data))
{
Console.WriteLine($"Output: {e.Data}");
@ -53,7 +53,7 @@ namespace CodeRelease.BLL
process.ErrorDataReceived += new DataReceivedEventHandler((sender, e) =>
{
Log.Logger.Information($"linux执行出错ErrorDataReceived命令{command}");
// Log.Logger.Information($"linux执行出错ErrorDataReceived命令{command}");
Log.Logger.Information($"linux执行出错ErrorDataReceivedOutput:{JsonConvert.SerializeObject(e)}");
if (!string.IsNullOrEmpty(e.Data))
{

View File

@ -72,7 +72,7 @@ app.MapGet("/system", () =>
long memoryUsage = currentProcess.WorkingSet64;
return new
{
msg = $"系统版本:{InformationalVersion},启动时间:{startDateTime.ToString("yyyy-MM-dd HH:mm:ss")},已安全运行时间:{DateTime.Now.Subtract(startDateTime).TotalMinutes.ToString("#.##")}分钟",
msg = $"系统版本:{InformationalVersion},启动时间:{startDateTime.ToString("yyyy-MM-dd HH:mm:ss")},已安全运行时间:{DateTime.Now.Subtract(startDateTime).TotalMinutes.ToString("0.##")}分钟",
InformationalVersion,
startDateTime,
MemoryUsage = $"{memoryUsage / (1024.0 * 1024.0):F2}MB",