diff --git a/src/ElectronNET.API/Common/ProcessRunner.cs b/src/ElectronNET.API/Common/ProcessRunner.cs index 5ac7612..843480a 100644 --- a/src/ElectronNET.API/Common/ProcessRunner.cs +++ b/src/ElectronNET.API/Common/ProcessRunner.cs @@ -536,7 +536,7 @@ if (e.Data != null) { - Console.WriteLine("|| " + e.Data); + System.Diagnostics.Debug.WriteLine(e.Data); } else { @@ -570,7 +570,7 @@ if (e.Data != null) { - Console.WriteLine("|| " + e.Data); + System.Diagnostics.Debug.WriteLine(e.Data); } else { diff --git a/src/ElectronNET.API/Runtime/StartupManager.cs b/src/ElectronNET.API/Runtime/StartupManager.cs index 8fe35cf..7ea0f4a 100644 --- a/src/ElectronNET.API/Runtime/StartupManager.cs +++ b/src/ElectronNET.API/Runtime/StartupManager.cs @@ -18,7 +18,7 @@ try { ElectronNetRuntime.BuildInfo = this.GatherBuildInfo(); - Console.WriteLine($"[Startup] GatherBuildInfo: {startTime.ElapsedMilliseconds}ms"); + System.Diagnostics.Debug.WriteLine($"[Startup] GatherBuildInfo: {startTime.ElapsedMilliseconds}ms"); } catch (Exception ex) { @@ -27,18 +27,18 @@ this.CollectProcessData(); this.SetElectronExecutable(); - Console.WriteLine($"[Startup] CollectProcessData+SetElectronExecutable: {startTime.ElapsedMilliseconds}ms"); + System.Diagnostics.Debug.WriteLine($"[Startup] CollectProcessData+SetElectronExecutable: {startTime.ElapsedMilliseconds}ms"); ElectronNetRuntime.StartupMethod = this.DetectAppTypeAndStartup(); - Console.WriteLine($"Evaluated StartupMethod: {ElectronNetRuntime.StartupMethod}"); - Console.WriteLine($"[Startup] DetectAppTypeAndStartup: {startTime.ElapsedMilliseconds}ms"); + System.Diagnostics.Debug.WriteLine($"Evaluated StartupMethod: {ElectronNetRuntime.StartupMethod}"); + System.Diagnostics.Debug.WriteLine($"[Startup] DetectAppTypeAndStartup: {startTime.ElapsedMilliseconds}ms"); if (ElectronNetRuntime.DotnetAppType != DotnetAppType.AspNetCoreApp) { ElectronNetRuntime.RuntimeControllerCore = this.CreateRuntimeController(); } - Console.WriteLine($"[Startup] Total StartupManager.Initialize: {startTime.ElapsedMilliseconds}ms"); + System.Diagnostics.Debug.WriteLine($"[Startup] Total StartupManager.Initialize: {startTime.ElapsedMilliseconds}ms"); } private RuntimeControllerBase CreateRuntimeController() @@ -142,18 +142,18 @@ if (electronAssembly == null) { - Console.WriteLine("GatherBuildInfo: Early exit"); + System.Diagnostics.Debug.WriteLine("GatherBuildInfo: Early exit"); return buildInfo; } if (electronAssembly.GetName().Name == "testhost" || electronAssembly.GetName().Name == "ReSharperTestRunner") { - Console.WriteLine("GatherBuildInfo: Detected testhost"); + System.Diagnostics.Debug.WriteLine("GatherBuildInfo: Detected testhost"); electronAssembly = AppDomain.CurrentDomain.GetData("ElectronTestAssembly") as Assembly ?? electronAssembly; } else { - Console.WriteLine("GatherBuildInfo: No testhost detected: " + electronAssembly.GetName().Name); + System.Diagnostics.Debug.WriteLine("GatherBuildInfo: No testhost detected: " + electronAssembly.GetName().Name); } var attributes = electronAssembly.GetCustomAttributes().ToList(); diff --git a/src/ElectronNET.Samples.BlazorSignalR/appsettings.Development.json b/src/ElectronNET.Samples.BlazorSignalR/appsettings.Development.json index 6062358..e4b38cf 100644 --- a/src/ElectronNET.Samples.BlazorSignalR/appsettings.Development.json +++ b/src/ElectronNET.Samples.BlazorSignalR/appsettings.Development.json @@ -4,7 +4,9 @@ "Default": "Information", "Microsoft.AspNetCore": "Warning", "Microsoft.AspNetCore.SignalR": "Warning", - "Microsoft.AspNetCore.Http.Connections": "Warning" + "Microsoft.AspNetCore.Http.Connections": "Warning", + "Microsoft.AspNetCore.Watch": "Warning", + "Microsoft.Hosting.Lifetime": "Information" } } }