mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +01:00
Migrate files to Dalamud.Logging namespace Remove Log.LogX methods.
This commit is contained in:
parent
6c56260f45
commit
8fd119dde8
16 changed files with 128 additions and 252 deletions
|
|
@ -6,7 +6,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog;
|
||||
using Serilog.Core;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Memory;
|
||||
using Microsoft.Win32;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ using System.Runtime.InteropServices;
|
|||
|
||||
using Dalamud.Interface.Internal.Windows;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Logging;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Plugin.Internal;
|
||||
using ImGuiNET;
|
||||
using Serilog.Events;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using Dalamud.Game.ClientState;
|
|||
using Dalamud.Game.Internal.DXGI;
|
||||
using Dalamud.Hooking;
|
||||
using Dalamud.Hooking.Internal;
|
||||
using Dalamud.Logging.Internal;
|
||||
using ImGuiNET;
|
||||
using ImGuiScene;
|
||||
using Serilog;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Logging;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Scratchpad
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,10 +6,9 @@ using System.Numerics;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Game.Command;
|
||||
using Dalamud.Interface.Colors;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Logging.Internal;
|
||||
using ImGuiNET;
|
||||
using Serilog;
|
||||
using Serilog.Events;
|
||||
|
|
@ -307,7 +306,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
try
|
||||
{
|
||||
this.historyPos = -1;
|
||||
for (int i = this.history.Count - 1; i >= 0; i--)
|
||||
for (var i = this.history.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (this.history[i] == this.commandText)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ using CheapLoc;
|
|||
using Dalamud.Interface.Colors;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Internal;
|
||||
using Dalamud.Plugin.Internal.Exceptions;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
|
||||
using ImGuiNET;
|
||||
using Serilog;
|
||||
|
||||
namespace Dalamud.Interface.Windowing
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
|
||||
namespace Dalamud
|
||||
namespace Dalamud.Logging.Internal
|
||||
{
|
||||
/// <summary>
|
||||
/// Class offering various methods to allow for logging in Dalamud modules.
|
||||
|
|
@ -3,7 +3,7 @@ using System;
|
|||
using Serilog.Core;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace Dalamud.Interface.Internal
|
||||
namespace Dalamud.Logging.Internal
|
||||
{
|
||||
/// <summary>
|
||||
/// Serilog event sink.
|
||||
113
Dalamud/Logging/PluginLog.cs
Normal file
113
Dalamud/Logging/PluginLog.cs
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Dalamud.Logging
|
||||
{
|
||||
/// <summary>
|
||||
/// Class offering various static methods to allow for logging in plugins.
|
||||
/// </summary>
|
||||
public static class PluginLog
|
||||
{
|
||||
/// <summary>
|
||||
/// Log a templated verbose message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Verbose(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Verbose($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated verbose message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Verbose(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Verbose(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated debug message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Debug(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Debug($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated debug message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Debug(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Debug(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated information message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Information(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Information($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated information message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Information(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Information(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated warning message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Warning(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Warning($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated warning message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Warning(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Warning(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated error message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Error(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Error($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated error message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Error(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Error(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated fatal message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Fatal(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Fatal($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated fatal message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Fatal(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Fatal(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Plugin.Internal.Types;
|
||||
|
||||
namespace Dalamud.Plugin.Internal
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Plugin.Internal.Exceptions;
|
||||
using Dalamud.Plugin.Internal.Types;
|
||||
using McMaster.NETCore.Plugins;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ using System.Threading.Tasks;
|
|||
using CheapLoc;
|
||||
using Dalamud.Configuration;
|
||||
using Dalamud.Game.Text;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Plugin.Internal.Exceptions;
|
||||
using Dalamud.Plugin.Internal.Types;
|
||||
using HarmonyLib;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Plugin.Internal.Types;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,240 +0,0 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Dalamud.Plugin
|
||||
{
|
||||
/// <summary>
|
||||
/// Class offering various static methods to allow for logging in plugins.
|
||||
/// </summary>
|
||||
public static class PluginLog
|
||||
{
|
||||
#region "Log" prefixed Serilog style methods
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Log(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Information($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Log(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Information(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated verbose message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogVerbose(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Verbose($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated verbose message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogVerbose(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Verbose(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated debug message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogDebug(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Debug($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated debug message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogDebug(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Debug(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated information message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogInformation(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Information($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated information message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogInformation(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Information(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated warning message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogWarning(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Warning($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated warning message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogWarning(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Warning(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated error message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogError(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Error($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated error message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogError(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Error(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated fatal message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogFatal(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Fatal($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated fatal message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void LogFatal(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Fatal(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Serilog style methods
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated verbose message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Verbose(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Verbose($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated verbose message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Verbose(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Verbose(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated debug message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Debug(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Debug($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated debug message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Debug(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Debug(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated information message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Information(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Information($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated information message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Information(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Information(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated warning message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Warning(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Warning($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated warning message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Warning(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Warning(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated error message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Error(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Error($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated error message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Error(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Error(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated fatal message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Fatal(string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Fatal($"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
/// <summary>
|
||||
/// Log a templated fatal message to the in-game debug log.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception that caused the error.</param>
|
||||
/// <param name="messageTemplate">The message template.</param>
|
||||
/// <param name="values">Values to log.</param>
|
||||
public static void Fatal(Exception exception, string messageTemplate, params object[] values)
|
||||
=> Serilog.Log.Fatal(exception, $"[{Assembly.GetCallingAssembly().GetName().Name}] {messageTemplate}", values);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue