mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-03-27 00:21:42 +01:00
Pass Seq settings directly
This commit is contained in:
parent
8f06a77da5
commit
e060c80dfc
@ -3,7 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.32014.148
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VoidCat", "VoidCat\VoidCat.csproj", "{4BF9EA98-D462-4665-8276-6D3B4CD50C3A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VoidCat", "VoidCat\VoidCat.csproj", "{4BF9EA98-D462-4665-8276-6D3B4CD50C3A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{40BC550E-CAD3-4E85-8BC9-539B53F87126}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.gitignore = .gitignore
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -3,7 +3,5 @@
|
||||
public class VoidSettings
|
||||
{
|
||||
public string DataDirectory { get; init; } = "./data";
|
||||
public Uri? SeqHost { get; init; }
|
||||
public string? SeqApiKey { get; init; }
|
||||
}
|
||||
}
|
||||
|
@ -8,11 +8,8 @@ var configuration = builder.Configuration;
|
||||
var voidSettings = configuration.GetSection("Settings").Get<VoidSettings>();
|
||||
services.AddSingleton(voidSettings);
|
||||
|
||||
// config logging
|
||||
if (voidSettings?.SeqHost != default)
|
||||
{
|
||||
builder.Logging.AddSeq(voidSettings.SeqHost.ToString(), voidSettings.SeqApiKey);
|
||||
}
|
||||
var seqSettings = configuration.GetSection("Seq");
|
||||
builder.Logging.AddSeq(seqSettings);
|
||||
|
||||
services.AddRouting();
|
||||
services.AddControllers().AddNewtonsoftJson();
|
||||
|
Loading…
x
Reference in New Issue
Block a user