Dev changes #5

Merged
omegaleo merged 45 commits from dev into main 2025-12-23 16:37:30 +00:00
3 changed files with 17 additions and 3 deletions
Showing only changes of commit 33a47f48c1 - Show all commits
5
@@ -319,6 +319,6 @@ public class HomeController : Controller
static string GetSolutionRoot()
{
return Assembly.GetEntryAssembly().Location;
return AppContext.BaseDirectory;
}
}
@@ -17,6 +17,9 @@
<PackageReference Include="Markdig" Version="0.40.0" />
<PackageReference Include="MarkdigExtensions.SyntaxHighlighting" Version="1.0.3" />
<PackageReference Include="NetFlow.DocumentationHelper.Library" Version="1.1.3" />
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
</ItemGroup>
</Project>
+13 -2
View File
@@ -1,11 +1,22 @@
using Serilog;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllersWithViews();
// Configure logging
builder.Logging.ClearProviders();
builder.Logging.AddConsole();
// Configure Serilog
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.WriteTo.Console()
.WriteTo.File(
path: Path.Combine(AppContext.BaseDirectory, "logs", "documentation-.txt"),
rollingInterval: RollingInterval.Day,
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}")
.CreateLogger();
builder.Host.UseSerilog();
var app = builder.Build();