2017-10-06 12:18:16 -04:00
|
|
|
|
using Microsoft.AspNetCore;
|
2017-03-18 18:52:44 -04:00
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
2019-07-23 16:38:49 -04:00
|
|
|
|
using Bit.Core.Utilities;
|
|
|
|
|
|
using Serilog.Events;
|
2017-03-18 18:52:44 -04:00
|
|
|
|
|
|
|
|
|
|
namespace Bit.Billing
|
|
|
|
|
|
{
|
|
|
|
|
|
public class Program
|
|
|
|
|
|
{
|
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
|
{
|
2017-10-06 12:18:16 -04:00
|
|
|
|
WebHost
|
|
|
|
|
|
.CreateDefaultBuilder(args)
|
2017-03-18 18:52:44 -04:00
|
|
|
|
.UseStartup<Startup>()
|
2019-07-23 16:38:49 -04:00
|
|
|
|
.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;
|
|
|
|
|
|
}))
|
2017-10-06 12:18:16 -04:00
|
|
|
|
.Build()
|
|
|
|
|
|
.Run();
|
2017-03-18 18:52:44 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|