|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using System.IO; |
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
@ -15,7 +16,7 @@ public class Program |
|
|
|
.AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")}.json", optional: true, reloadOnChange: true); |
|
|
|
|
|
|
|
Log.Logger = new LoggerConfiguration() |
|
|
|
.WriteTo.Async(c => c.File("Logs/logs.txt" |
|
|
|
.WriteTo.Async(c => c.File(Path.Combine(Directory.GetCurrentDirectory(), "../Logs/logs.txt") |
|
|
|
, rollingInterval: RollingInterval.Day |
|
|
|
, rollOnFileSizeLimit: true |
|
|
|
, fileSizeLimitBytes: 30 * 1024 * 1024)) |
|
|
|