naps2/NAPS2.Core/Util/Log.cs
2018-08-09 01:27:46 -04:00

36 lines
889 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
namespace NAPS2.Util
{
/// <summary>
/// Logging functionality.
/// </summary>
public class Log
{
private static ILogger _logger = new NullLogger();
public static ILogger Logger
{
get => _logger;
set => _logger = value ?? throw new ArgumentNullException(nameof(value));
}
public static void Error(string message, params object[] args)
{
_logger.Error(string.Format(message, args));
}
public static void ErrorException(string message, Exception exception)
{
_logger.ErrorException(message, exception);
}
public static void FatalException(string message, Exception exception)
{
_logger.FatalException(message, exception);
}
}
}