1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-11-21 23:42:45 +01:00
Minecraft-Phantom-Panel/Common/Phantom.Common.Logging/LoggerExtensions.cs
2022-10-06 05:06:03 +02:00

16 lines
574 B
C#

using Serilog;
namespace Phantom.Common.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);
}
}