mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 05:00:19 -05:00
32 lines
986 B
C#
32 lines
986 B
C#
using Microsoft.AspNetCore;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Bit.Core.Utilities;
|
|
using Serilog.Events;
|
|
|
|
namespace Bit.Billing
|
|
{
|
|
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(e.Level == LogEventLevel.Information &&
|
|
(context.StartsWith("\"Bit.Billing.Jobs") || context.StartsWith("\"Bit.Core.Jobs")))
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return e.Level >= LogEventLevel.Warning;
|
|
}))
|
|
.Build()
|
|
.Run();
|
|
}
|
|
}
|
|
}
|