SshNetLoggingConfiguration
Allows configuring the logging for internal logs of SSH.NET.
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Renci.SshNet.Common;
using System.Runtime.CompilerServices;
namespace Renci.SshNet
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public static class SshNetLoggingConfiguration
{
internal static ILoggerFactory LoggerFactory { get; set; } = NullLoggerFactory.Instance;
public static void InitializeLogging(ILoggerFactory loggerFactory)
{
ThrowHelper.ThrowIfNull(loggerFactory, "loggerFactory");
LoggerFactory = loggerFactory;
}
}
}