This commit is contained in:
16
server/util/ApplicationLogging.cs
Normal file
16
server/util/ApplicationLogging.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NLog.Extensions.Logging;
|
||||
|
||||
namespace Sockeye.Util
|
||||
{
|
||||
/// <summary>
|
||||
/// Shared logger
|
||||
/// </summary>
|
||||
internal static class ApplicationLogging
|
||||
{
|
||||
internal static ILogger theLogger { get; set; }
|
||||
internal static NLogLoggerProvider LoggerProvider { get; set; }
|
||||
internal static ILogger CreateLogger<T>() => LoggerProvider.CreateLogger(typeof(T).FullName);
|
||||
internal static ILogger CreateLogger(string categoryName) => LoggerProvider.CreateLogger(categoryName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user