-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoggerHealthCheckOptions.cs
More file actions
23 lines (21 loc) · 812 Bytes
/
Copy pathLoggerHealthCheckOptions.cs
File metadata and controls
23 lines (21 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using LoggerHealthCheck;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Logging;
using System;
namespace LoggerHealthCheck
{
/// <summary>
/// Provides configuration for <see cref="LoggerHealthCheck"/>
/// </summary>
public class LoggerHealthCheckOptions
{
/// <summary>
/// What <see cref="LogLevel"/> is required to mark the healtcheck as <see cref="HealthStatus.Unhealthy"/>, default is <see cref="LogLevel.Error"/>.
/// </summary>
public LogLevel UnhealthyLogLevel { get; set; } = LogLevel.Error;
/// <summary>
/// Filter used to determine what log events will affect the HealthCheck
/// </summary>
public Func<LogEntry, bool> Filter { get; set; } = Filters.DefaultHealthCheck;
}
}