mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-10-01 11:22:53 +00:00
Use ILogger instead of Console.WriteLine
This commit is contained in:
@@ -1,10 +1,25 @@
|
||||
namespace ElectronNET.API
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
/// <summary>
|
||||
/// The Electron.NET API
|
||||
/// </summary>
|
||||
public static class Electron
|
||||
{
|
||||
private static ILoggerFactory loggerFactory;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the logger factory to be used by Electron, if any
|
||||
/// </summary>
|
||||
public static ILoggerFactory LoggerFactory
|
||||
{
|
||||
private get => loggerFactory; set
|
||||
{
|
||||
loggerFactory = value;
|
||||
BridgeConnector.Logger = value.CreateLogger<App>();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Communicate asynchronously from the main process to renderer processes.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user