22 lines
772 B
C#
Raw Normal View History

2020-01-11 17:56:12 +01:00
using Microsoft.Extensions.Logging;
2019-06-12 21:56:55 +02:00
namespace Capnp
{
/// <summary>
/// Runtime logging features rely on <see cref="Microsoft.Extensions.Logging"/>
/// </summary>
public static class Logging
{
/// <summary>
/// Gets or sets the logger factory which will be used by this assembly.
/// </summary>
public static ILoggerFactory LoggerFactory { get; set; } = new LoggerFactory();
/// <summary>
/// Creates a new ILogger instance, using the LoggerFactory of this class.
/// </summary>
/// <typeparam name="T">The type using the logger</typeparam>
/// <returns>The logger instance</returns>
public static ILogger CreateLogger<T>() => LoggerFactory.CreateLogger<T>();
}
2020-01-11 17:56:12 +01:00
}