|
|
|
|
@ -1,5 +1,6 @@
@@ -1,5 +1,6 @@
|
|
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
|
using Serilog; |
|
|
|
|
|
|
|
|
|
namespace Bit.CryptoAgent |
|
|
|
|
{ |
|
|
|
|
@ -12,9 +13,22 @@ namespace Bit.CryptoAgent
@@ -12,9 +13,22 @@ namespace Bit.CryptoAgent
|
|
|
|
|
.ConfigureWebHostDefaults(webBuilder => |
|
|
|
|
{ |
|
|
|
|
webBuilder.UseStartup<Startup>(); |
|
|
|
|
webBuilder.ConfigureLogging((hostingContext, logging) => |
|
|
|
|
{ |
|
|
|
|
var serilogConfig = new LoggerConfiguration() |
|
|
|
|
.Enrich.FromLogContext() |
|
|
|
|
.WriteTo.File("/etc/bitwarden/logs/log.txt", |
|
|
|
|
rollOnFileSizeLimit: true, |
|
|
|
|
rollingInterval: RollingInterval.Day); |
|
|
|
|
|
|
|
|
|
var serilog = serilogConfig.CreateLogger(); |
|
|
|
|
logging.AddSerilog(serilog); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.Build() |
|
|
|
|
.Run(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|