Files
SPT-Server-Build/Server/Logger/FileFormatter.cs
T
2025-02-05 07:36:13 +00:00

15 lines
427 B
C#

using System.Text.RegularExpressions;
namespace Server.Logger;
public class FileFormatter : AbstractFormatter
{
protected override string ProcessText(string message)
{
foreach (Match match in Regex.Matches(message, @"\x1b\[[0-9]{1,2}(;[0-1]{1,2}){0,1}m")) message = message.Replace(match.Value, "");
return message.Replace("\"", "");
}
public static FileFormatter Default { get; } = new();
}