提交代码
This commit is contained in:
parent
3e4cf7c554
commit
c02f05bcdf
|
|
@ -1,5 +1,7 @@
|
|||
using CodeRelease.Model;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using Serilog;
|
||||
|
||||
using System;
|
||||
|
|
@ -39,7 +41,7 @@ namespace CodeRelease.BLL
|
|||
// 绑定输出和错误数据接收事件
|
||||
process.OutputDataReceived += new DataReceivedEventHandler((sender, e) =>
|
||||
{
|
||||
Log.Logger.Information("linux执行出错,命令{command},sender:{sender}Output:{e}", command, sender, e);
|
||||
Log.Logger.Information("linux执行出错OutputDataReceived,命令{command},sender:{sender}Output:{e}", command, JsonConvert.SerializeObject(sender), JsonConvert.SerializeObject(e));
|
||||
if (!string.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
Console.WriteLine($"Output: {e.Data}");
|
||||
|
|
@ -49,7 +51,7 @@ namespace CodeRelease.BLL
|
|||
|
||||
process.ErrorDataReceived += new DataReceivedEventHandler((sender, e) =>
|
||||
{
|
||||
Log.Logger.Information("linux执行出错,命令{command},sender:{sender}Output:{e}", command, sender, e);
|
||||
Log.Logger.Information("linux执行出错ErrorDataReceived,命令{command},sender:{sender}Output:{e}", command, JsonConvert.SerializeObject(sender), JsonConvert.SerializeObject(e));
|
||||
if (!string.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
Console.WriteLine($"Error: {e.Data}");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user