Add NLog configuration and minor property updates

Added a new NLog configuration section in `appsettings.json` to enable structured logging. This includes settings for log file storage, log targets for different levels (Info, Warn, Error, Fatal), and retention policies.

Added the `NLog` property to the configuration. Introduced a new `AddedWho` property with the value `ReC.API`.

Removed and re-added the `FakeProfileId` property without changing its value. No changes were made to `LuckyPennySoftwareLicenseKey` or `RecAction` sections.
This commit is contained in:
tekh 2025-12-05 09:58:05 +01:00
parent 40019bf693
commit 9992086e48

View File

@ -14,5 +14,56 @@
"MaxConcurrentInvocations": 5
},
"AddedWho": "ReC.API",
"FakeProfileId": 2
"FakeProfileId": 2,
"NLog": {
"throwConfigExceptions": true,
"variables": {
"logDirectory": "E:\\LogFiles\\Digital Data\\Rec.API",
"logFileNamePrefix": "${shortdate}-Rec.API.Web"
},
"targets": {
"infoLogs": {
"type": "File",
"fileName": "${logDirectory}\\${logFileNamePrefix}-Info.log",
"maxArchiveDays": 30
},
"warningLogs": {
"type": "File",
"fileName": "${logDirectory}\\${logFileNamePrefix}-Warning.log",
"maxArchiveDays": 30
},
"errorLogs": {
"type": "File",
"fileName": "${logDirectory}\\${logFileNamePrefix}-Error.log",
"maxArchiveDays": 30
},
"criticalLogs": {
"type": "File",
"fileName": "${logDirectory}\\${logFileNamePrefix}-Critical.log",
"maxArchiveDays": 30
}
},
"rules": [
{
"logger": "*",
"level": "Info",
"writeTo": "infoLogs"
},
{
"logger": "*",
"level": "Warn",
"writeTo": "warningLogs"
},
{
"logger": "*",
"level": "Error",
"writeTo": "errorLogs"
},
{
"logger": "*",
"level": "Fatal",
"writeTo": "criticalLogs"
}
]
}
}