Files
Fuchs_Intranet/Fuchs/appsettings.json
T
StefanandClaude Sonnet 5 bcf1f2dbb6
Playwright Tests / test (push) Canceled after 0s
feat: migrate DB error logging onto the generic OCORE MultiLogger SQL sink
Retires Fuchs_intranet.debug_log() and every direct EXECUTE [dbo].[fds__admin_logdebug]
call in favor of a single path: ILogger. A new SQL log sink (OCORE.MultiLogger.SqlLoggerProvider,
gated by Fuchs:Logging:SqlSink:Enabled, default on) mirrors every _logger.LogWarning/-Error/
-Critical call into [dbo].[fds__debuglog] via a new fds__admin_logdebug_ext proc, at Warning+.

- Program.cs registers the sink and RequestLogScopeMiddleware (request id/path/authenticated
  user, pushed after UseAuthentication) so every log line in a request — including ones written
  deep inside OCORE's SQL helpers — is attributed automatically.
- FIS_SQLOptions, IntranetController.Do's catch-all, PdfPreviewAsync, and the banking-upload
  handlers now log once, with an explicit EventId preserving the exact CodeReference text the
  retired debug_log() calls used to write, so existing dashboards/queries over fds__debuglog
  keep working unchanged.
- Fuchs_DataService/FdsMfr.cs's FdsSqlOptions had the identical double-write hazard (it's hosted
  in the same process per ADR 0010) — the original 2026-09-16 log review's mfr__getSchema/
  fds__getUpdateableRequests deadlock rows came from exactly this class. Fixed the same way.
- fds__debuglog gains LogLevel/Machine/Category/Account/AuthUser/IsDebug columns; the legacy
  fds__admin_logdebug proc is left in place unused, not dropped.
- FdsDebug.DebugLog (Fuchs_DataService's other ~9 call sites) deliberately left on its direct
  DB-write path — no ILogger call sits alongside it there, so no duplication risk today.

See ADR 0024 (supersedes 0023) and Docs/Concepts/error-logging-pipeline.md.

New tests: ErrorLoggingTests (FIS_SQLOptions), FdsSqlOptionsTests, RequestLogScopeMiddlewareTests.
694/694 pass (the 4 PdfPipelineTests failures seen under full-suite parallel runs are a
pre-existing, unrelated PdfSharp global-font-resolver test-isolation flake — they pass both
individually and in most full-suite runs).

Bumps the OCORE submodule to 3137b56 (SQL sink hardening: redaction matches short fragments
as whole identifier segments, per-entry-tolerant serialization, lazy dataSerialized, opt-in
SqlLoggerOptions.IncludeCategory, LogEntry.Category/AuthUser capture).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 17:20:06 +02:00

110 lines
3.5 KiB
JSON

{
"SecretManagement": {
"VaultUri": "https://pcwkeys.vault.azure.net/",
"AppName": "fuchs",
"CacheFilePath": "secrets.cache",
"SyncIntervalHours": 6,
"ManagedSecretKeys": [
"ConnectionStrings--fuchs-fds-username",
"ConnectionStrings--fuchs-fds-password",
"ConnectionStrings--AzureBlobStorage-ConnectionString",
"Fuchs--SMS-APIKey",
"Fuchs--Mailer--Token",
"Fuchs--fuchs-captcha-TOTP",
"Fuchs--fuchs-intranet-TOTP",
"Fds--MFR-UserName",
"Fds--MFR-Password",
"SpirePdf-License"
]
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"SpirePdf_License": "MANAGED_BY_KEYVAULT",
"ConnectionStrings": {
"fuchs_fds_ConnectionString": "Data Source=MSSQL4.NBG4.DOMAINXYZ.DE,10439;Initial Catalog=site_fuchs;Persist Security Info=False;TrustServerCertificate=true;Encrypt=true;User ID={username};password='{password}';Connect Timeout=60;Load Balance Timeout=240;Max Pool Size=500;",
"fuchs_fds_username": "MANAGED_BY_KEYVAULT",
"fuchs_fds_password": "MANAGED_BY_KEYVAULT",
"AzureBlobStorage_ConnectionString": "MANAGED_BY_KEYVAULT"
},
"Fuchs": {
"IsTestDeployment": false,
"ocms_guid": "00094b8f-a822-4e9c-b627-87802f93fca8",
"ocms_valid_locales_csv": "de,en",
"ocms_default_locale": "de",
"fuchs_guid": "cbfc57b3-6b85-4bbc-ab68-3b2c7408af5e",
"fuchs_intranet_guid": "cbfc57b3-6b85-4bbc-ab68-3b2c7408af5e",
"fuchs_captcha_TOTP": "MANAGED_BY_KEYVAULT",
"fuchs_intranet_TOTP": "MANAGED_BY_KEYVAULT",
"SMS_APIKey": "MANAGED_BY_KEYVAULT",
"Mailer": {
"BaseUrl": "https://api.processweb.de",
"AccountId": "7da3c1e6-4180-42d6-9a60-5a09d005cce6",
"Token": "MANAGED_BY_KEYVAULT",
"ServerId": "1192f3bf-57e5-4fd2-bb5d-3b7b983a2d98",
"Enabled": true
},
"Email": {
"OverrideRecipient": ""
},
"StartupChecks": {
"Enabled": false,
"CheckKeyVault": true,
"CheckDatabase": true,
"CheckMfr": true,
"SendStartupEmail": true,
"StartupEmailRecipient": "",
"StartupEmailRecipientName": "Startup Monitor"
},
"AzureStorage": {
"Enabled": true,
"InvoiceContainer": "fuchs-invoices",
"ReminderContainer": "fuchs-reminders",
"MetadataFields": [ "Id", "Version", "InvoiceId", "InvoiceTitle", "InvId", "DocumentName", "file_guid" ]
},
"Telemetry": {
"Enabled": true,
"OtlpEndpoint": ""
},
"Logging": {
"SqlSink": {
"Enabled": true
}
},
"ERechnung": {
"Enabled": false,
"Profile": "EN16931",
"Seller": {
"Name": "Sebastian Fuchs GmbH & Co. KG",
"Street": "Germaniastraße 15",
"PostalCode": "40223",
"City": "Düsseldorf",
"CountryCode": "DE",
"TaxNumber": "106/5849/2962",
"VatId": "DE286366012",
"LegalRegistrationId": "",
"Iban": "DE76300501100045014800",
"Bic": "DUSSDEDDXXX",
"Email": "info@sanitaerfuchs.de",
"Phone": "0211 - 31 07 222"
},
"Validation": {
"Enabled": true,
"ServiceUrl": "https://api.processweb.de/api/eInvoice",
"FailOnError": false
}
}
},
"Fds": {
"SyncEnabled": true,
"ExecutionFrequency_Minutes": 15,
"DebugDetails": false,
"MFR_host": "portal.mobilefieldreport.com",
"MFR_UserName": "MANAGED_BY_KEYVAULT",
"MFR_Password": "MANAGED_BY_KEYVAULT"
}
}