aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-10-15 14:27:13 -0500
committerGitHub <noreply@github.com>2023-10-15 14:27:13 -0500
commit5986bcadc179e3e9a34152687b80210dcc65e366 (patch)
tree69c89224d513f513793ac415664b4b584c383a82 /src/slskd/Program.cs
parent12e89983470a55e03f30f35002135b921183c72b (diff)
parent4670f2a708b48d3bb73021a3954b8ca76bf56aa5 (diff)
downloadslskd-5986bcadc179e3e9a34152687b80210dcc65e366.tar.gz
Merge pull request #978 from slskd/file-retention
Add automated removal of downloaded and incomplete files, and application logs
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index 418a29c2..7a832ddb 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -952,7 +952,8 @@ namespace slskd
config.File(
Path.Combine(AppDirectory, "logs", $"{AppName}-.log"),
outputTemplate: (OptionsAtStartup.Debug ? "[{SourceContext}] " : string.Empty) + "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}",
- rollingInterval: RollingInterval.Day))
+ rollingInterval: RollingInterval.Day,
+ retainedFileTimeLimit: TimeSpan.FromDays(OptionsAtStartup.Retention.Logs)))
.WriteTo.Conditional(
e => !string.IsNullOrEmpty(OptionsAtStartup.Logger.Loki),
config => config.GrafanaLoki(