mirror of
https://github.com/bitwarden/server
synced 2025-12-25 04:33:26 +00:00
32 lines
1018 B
C#
32 lines
1018 B
C#
using Microsoft.AspNetCore;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Bit.Core.Utilities;
|
|
using Serilog.Events;
|
|
|
|
namespace Bit.Events
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
WebHost
|
|
.CreateDefaultBuilder(args)
|
|
.UseStartup<Startup>()
|
|
.ConfigureLogging((hostingContext, logging) =>
|
|
logging.AddSerilog(hostingContext, e =>
|
|
{
|
|
var context = e.Properties["SourceContext"].ToString();
|
|
if(context.Contains("IdentityServer4.Validation.TokenValidator") ||
|
|
context.Contains("IdentityServer4.Validation.TokenRequestValidator"))
|
|
{
|
|
return e.Level > LogEventLevel.Error;
|
|
}
|
|
|
|
return e.Level >= LogEventLevel.Error;
|
|
}))
|
|
.Build()
|
|
.Run();
|
|
}
|
|
}
|
|
}
|