aboutsummaryrefslogtreecommitdiff
path: root/apps/VNLib.WebServer/src/Config
diff options
context:
space:
mode:
Diffstat (limited to 'apps/VNLib.WebServer/src/Config')
-rw-r--r--apps/VNLib.WebServer/src/Config/Model/BenchmarkConfig.cs3
-rw-r--r--apps/VNLib.WebServer/src/Config/Model/LogConfig.cs52
-rw-r--r--apps/VNLib.WebServer/src/Config/Model/VirtualHostServerConfig.cs2
3 files changed, 56 insertions, 1 deletions
diff --git a/apps/VNLib.WebServer/src/Config/Model/BenchmarkConfig.cs b/apps/VNLib.WebServer/src/Config/Model/BenchmarkConfig.cs
index c569b95..1b0f157 100644
--- a/apps/VNLib.WebServer/src/Config/Model/BenchmarkConfig.cs
+++ b/apps/VNLib.WebServer/src/Config/Model/BenchmarkConfig.cs
@@ -26,7 +26,8 @@ using System.Text.Json.Serialization;
namespace VNLib.WebServer.Config.Model
{
- internal class BenchmarkConfig
+
+ internal sealed class BenchmarkConfig
{
[JsonPropertyName("enabled")]
diff --git a/apps/VNLib.WebServer/src/Config/Model/LogConfig.cs b/apps/VNLib.WebServer/src/Config/Model/LogConfig.cs
new file mode 100644
index 0000000..fafd630
--- /dev/null
+++ b/apps/VNLib.WebServer/src/Config/Model/LogConfig.cs
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2024 Vaughn Nugent
+*
+* Library: VNLib
+* Package: VNLib.WebServer
+* File: LogConfig.cs
+*
+* LogConfig.cs is part of VNLib.WebServer which is part of the
+* larger VNLib collection of libraries and utilities.
+*
+* VNLib.WebServer is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 2 of the License,
+* or (at your option) any later version.
+*
+* VNLib.WebServer is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with VNLib.WebServer. If not, see http://www.gnu.org/licenses/.
+*/
+
+using System.Text.Json.Serialization;
+
+namespace VNLib.WebServer.Config.Model
+{
+ internal sealed class LogConfig
+ {
+ [JsonPropertyName("enabled")]
+ public bool Enabled { get; set; } = false;
+
+ [JsonPropertyName("path")]
+ public string? Path { get; set; }
+
+ [JsonPropertyName("template")]
+ public string? Template { get; set; }
+
+ [JsonPropertyName("flush_sec")]
+ public int FlushIntervalSeconds { get; set; } = 10;
+
+ [JsonPropertyName("retained_files")]
+ public int RetainedFiles { get; set; } = 31;
+
+ [JsonPropertyName("file_size_limit")]
+ public int FileSizeLimit { get; set; } = 500 * 1000 * 1024;
+
+ [JsonPropertyName("interval")]
+ public string Interval { get; set; } = "infinite";
+ }
+}
diff --git a/apps/VNLib.WebServer/src/Config/Model/VirtualHostServerConfig.cs b/apps/VNLib.WebServer/src/Config/Model/VirtualHostServerConfig.cs
index 2f18cf7..5734bd3 100644
--- a/apps/VNLib.WebServer/src/Config/Model/VirtualHostServerConfig.cs
+++ b/apps/VNLib.WebServer/src/Config/Model/VirtualHostServerConfig.cs
@@ -92,5 +92,7 @@ namespace VNLib.WebServer.Config.Model
[JsonPropertyName("path_filter")]
public string? PathFilter { get; set; }
+ [JsonPropertyName("max_execution_time_ms")]
+ public int MaxExecutionTimeMs { get; set; } = 20000;
}
}