Enhance logging in FdsSqlOptions and related classes
- Updated FdsSqlOptions to accept an optional ILogger parameter for improved error logging. - Modified FdsMfr and FdsMfrClient classes to pass the logger instance to FdsSqlOptions. - Added detailed error logging in various methods to capture SQL execution issues and file handling errors. - Improved documentation for FdsSqlOptions to clarify logging behavior. - Updated Archive class to log compression errors, enhancing traceability of failures. - Adjusted project configuration to suppress specific warnings related to transitive dependencies. - Added NuGet.config to define package sources for dependency management. - Updated submodule references for OCORE and related projects.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.Data.SqlClient
|
||||
@using Newtonsoft.Json
|
||||
@inject IConfiguration Configuration
|
||||
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostEnvironment
|
||||
@{
|
||||
bool isAuth = User.Identity?.IsAuthenticated ?? false;
|
||||
|
||||
@@ -16,12 +19,26 @@
|
||||
string appName = ViewData["AppName"] as string ?? "Fuchs Intranet";
|
||||
string fullName = ViewData["FullName"] as string ?? "";
|
||||
string pageTitle = ViewData["Title"] as string ?? "Intranet";
|
||||
string? debugDbTarget = null;
|
||||
if (HostEnvironment.IsDevelopment())
|
||||
{
|
||||
var connectionString = Configuration.GetConnectionString("fuchs_fds_ConnectionString");
|
||||
if (!string.IsNullOrWhiteSpace(connectionString))
|
||||
{
|
||||
var builder = new SqlConnectionStringBuilder(connectionString);
|
||||
debugDbTarget = $"{builder.DataSource} / {builder.InitialCatalog}";
|
||||
}
|
||||
}
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@if (!string.IsNullOrWhiteSpace(debugDbTarget))
|
||||
{
|
||||
<meta name="fuchs-debug-database" content="@debugDbTarget" />
|
||||
}
|
||||
<title>@pageTitle</title>
|
||||
<script src="~/web/tools.js" asp-append-version="true"></script>
|
||||
|
||||
@@ -92,6 +109,7 @@
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<div id="notification_frame"></div>
|
||||
@await RenderSectionAsync("BodyFooter", required: false)
|
||||
</footer>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user