mirror of
https://github.com/cyanfish/naps2.git
synced 2024-10-04 19:37:15 +03:00
36 lines
889 B
C#
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);
|
|
}
|
|
}
|
|
}
|