1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-11-24 22:42:53 +01:00
Minecraft-Phantom-Panel/Utils/Phantom.Utils.Logging/LoggerExtensions.cs

16 lines
572 B
C#

using Serilog;
namespace Phantom.Utils.Logging;
public static class LoggerExtensions {
private static readonly string HeadingPadding = new (' ', 23);
private static readonly string HeadingLine = new ('-', Math.Min(50, Console.BufferWidth));
private static readonly string Heading1 = HeadingLine + '\n' + HeadingPadding;
private static readonly string Heading2 = '\n' + HeadingPadding + HeadingLine;
public static void InformationHeading(this ILogger logger, string title) {
logger.Information("{Heading1}{Title}{Heading2}", Heading1, title, Heading2);
}
}