mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 01:01:34 +02:00
New: Configure log file size limit in UI
(cherry picked from commit 35baebaf7280749d5dfe5440e28b425e45a22d21)
This commit is contained in:
@@ -448,6 +448,8 @@
|
||||
"LogFiles": "Log Files",
|
||||
"LogLevel": "Log Level",
|
||||
"LogLevelTraceHelpTextWarning": "Trace logging should only be enabled temporarily",
|
||||
"LogSizeLimit": "Log Size Limit",
|
||||
"LogSizeLimitHelpText": "Maximum log file size in MB before archiving. Default is 1MB.",
|
||||
"Logging": "Logging",
|
||||
"Logs": "Logs",
|
||||
"MIA": "MIA",
|
||||
|
@@ -61,6 +61,8 @@ namespace Prowlarr.Api.V1.Config
|
||||
.Must((resource, path) => IsValidSslCertificate(resource)).WithMessage("Invalid SSL certificate file or password")
|
||||
.When(c => c.EnableSsl);
|
||||
|
||||
SharedValidator.RuleFor(c => c.LogSizeLimit).InclusiveBetween(1, 10);
|
||||
|
||||
SharedValidator.RuleFor(c => c.Branch).NotEmpty().WithMessage("Branch name is required, 'master' is the default");
|
||||
SharedValidator.RuleFor(c => c.UpdateScriptPath).IsValidPath().When(c => c.UpdateMechanism == UpdateMechanism.Script);
|
||||
|
||||
|
@@ -21,6 +21,7 @@ namespace Prowlarr.Api.V1.Config
|
||||
public string Password { get; set; }
|
||||
public string PasswordConfirmation { get; set; }
|
||||
public string LogLevel { get; set; }
|
||||
public int LogSizeLimit { get; set; }
|
||||
public string ConsoleLogLevel { get; set; }
|
||||
public string Branch { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
@@ -66,6 +67,7 @@ namespace Prowlarr.Api.V1.Config
|
||||
//Username
|
||||
//Password
|
||||
LogLevel = model.LogLevel,
|
||||
LogSizeLimit = model.LogSizeLimit,
|
||||
ConsoleLogLevel = model.ConsoleLogLevel,
|
||||
Branch = model.Branch,
|
||||
ApiKey = model.ApiKey,
|
||||
|
Reference in New Issue
Block a user