Merge branch 'main' into v17/dev
# Conflicts: # src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Umbraco.Cms.Core.Logging.Serilog.Enrichers;
|
||||
/// This is used to create a new property in Logs called 'Log4NetLevel'
|
||||
/// So that we can map Serilog levels to Log4Net levels - so log files stay consistent
|
||||
/// </summary>
|
||||
internal class Log4NetLevelMapperEnricher : ILogEventEnricher
|
||||
internal sealed class Log4NetLevelMapperEnricher : ILogEventEnricher
|
||||
{
|
||||
public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ using Serilog.Events;
|
||||
|
||||
namespace Umbraco.Cms.Core.Logging.Viewer;
|
||||
|
||||
internal class CountingFilter : ILogFilter
|
||||
internal sealed class CountingFilter : ILogFilter
|
||||
{
|
||||
public CountingFilter() => Counts = new LogLevelCounts();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ using Serilog.Events;
|
||||
|
||||
namespace Umbraco.Cms.Core.Logging.Viewer;
|
||||
|
||||
internal class ErrorCounterFilter : ILogFilter
|
||||
internal sealed class ErrorCounterFilter : ILogFilter
|
||||
{
|
||||
public int Count { get; private set; }
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ using Umbraco.Extensions;
|
||||
namespace Umbraco.Cms.Core.Logging.Viewer;
|
||||
|
||||
// Log Expression Filters (pass in filter exp string)
|
||||
internal class ExpressionFilter : ILogFilter
|
||||
internal sealed class ExpressionFilter : ILogFilter
|
||||
{
|
||||
private const string ExpressionOperators = "()+=*<>%-";
|
||||
private readonly Func<LogEvent, bool>? _filter;
|
||||
@@ -57,7 +57,7 @@ internal class ExpressionFilter : ILogFilter
|
||||
|
||||
public bool TakeLogEvent(LogEvent e) => _filter == null || _filter(e);
|
||||
|
||||
private Func<LogEvent, bool>? PerformMessageLikeFilter(string filterExpression, SerilogLegacyNameResolver serilogLegacyNameResolver)
|
||||
private static Func<LogEvent, bool>? PerformMessageLikeFilter(string filterExpression, SerilogLegacyNameResolver serilogLegacyNameResolver)
|
||||
{
|
||||
var filterSearch = $"@Message like '%{SerilogExpression.EscapeLikeExpressionContent(filterExpression)}%'";
|
||||
if (SerilogExpression.TryCompile(filterSearch, null, serilogLegacyNameResolver, out CompiledExpression? compiled, out var error))
|
||||
|
||||
@@ -2,7 +2,7 @@ using Serilog.Events;
|
||||
|
||||
namespace Umbraco.Cms.Core.Logging.Viewer;
|
||||
|
||||
internal class MessageTemplateFilter : ILogFilter
|
||||
internal sealed class MessageTemplateFilter : ILogFilter
|
||||
{
|
||||
public readonly Dictionary<string, int> Counts = new();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ using ILogger = Serilog.ILogger;
|
||||
|
||||
namespace Umbraco.Cms.Core.Logging.Viewer;
|
||||
|
||||
internal class SerilogJsonLogViewer : SerilogLogViewerSourceBase
|
||||
internal sealed class SerilogJsonLogViewer : SerilogLogViewerSourceBase
|
||||
{
|
||||
private const int FileSizeCap = 100;
|
||||
private readonly ILogger<SerilogJsonLogViewer> _logger;
|
||||
@@ -112,7 +112,7 @@ internal class SerilogJsonLogViewer : SerilogLogViewerSourceBase
|
||||
return logs;
|
||||
}
|
||||
|
||||
private string GetSearchPattern(DateTime day) => $"*{day:yyyyMMdd}*.json";
|
||||
private static string GetSearchPattern(DateTime day) => $"*{day:yyyyMMdd}*.json";
|
||||
|
||||
private bool TryRead(LogEventReader reader, out LogEvent? evt)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user