aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/API/Controllers/LogsController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Core/API/Controllers/LogsController.cs')
-rw-r--r--src/slskd/Core/API/Controllers/LogsController.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/slskd/Core/API/Controllers/LogsController.cs b/src/slskd/Core/API/Controllers/LogsController.cs
index a35c6097..fff5e843 100644
--- a/src/slskd/Core/API/Controllers/LogsController.cs
+++ b/src/slskd/Core/API/Controllers/LogsController.cs
@@ -35,6 +35,7 @@ namespace slskd.Core.API
using System;
using System.Collections.Generic;
using System.IO;
+ using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Asp.Versioning;
@@ -61,6 +62,7 @@ namespace slskd.Core.API
private FileService Files { get; }
private ILogger Log { get; } = Serilog.Log.ForContext<ApplicationController>();
+ private Regex LogLineParseRegex { get; } = new Regex(@"^(\[?([a-zA-Z\.]*)\]?\s)?(\[((\d{4}-\d{2}-\d{2})T)?(\d{2}:\d{2}:\d{2}(?:.\d{3})?)\s([A-Z]+)\]\s)?(.*)", RegexOptions.Compiled);
/// <summary>
/// Gets the last few application logs.