Christian Köllner cbf2144ef4 Initial commit
2019-06-12 21:56:55 +02:00

24 lines
787 B
C#

using System;
using Microsoft.Extensions.Logging;
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>();
}
}