mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Core - Limit log file size to 5 MB and only retain max 14 log files
This commit is contained in:
1 parent
86a22a9d39
commit
704d649fba
1 file changed
+3
@@ -13,7 +13,10 @@ internal class LoggerFactory : ILoggerFactory
|
|||||||
internal static readonly ILogger Logger = new LoggerConfiguration()
|
internal static readonly ILogger Logger = new LoggerConfiguration()
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
.WriteTo.File(Path.Combine(Constants.LogsFolder, "Artemis log-.log"),
|
.WriteTo.File(Path.Combine(Constants.LogsFolder, "Artemis log-.log"),
|
||||||
|
fileSizeLimitBytes: 5 * 1024 * 1024,
|
||||||
|
rollOnFileSizeLimit: true,
|
||||||
rollingInterval: RollingInterval.Day,
|
rollingInterval: RollingInterval.Day,
|
||||||
|
retainedFileCountLimit: 14,
|
||||||
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] [{SourceContext}] {Message:lj}{NewLine}{Exception}")
|
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] [{SourceContext}] {Message:lj}{NewLine}{Exception}")
|
||||||
.WriteTo.Console()
|
.WriteTo.Console()
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
Reference in new issue
Block a user