How to generate low level trace log for Orchestrator webhooks?
Resolution:
- Add the below content into the webhooks/appsettings.json file under the LedgerConfiguration session
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
},
"ApplicationInsights": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore.Authentication": "Warning"
}
}
},
"NLog": {
"IncludeScopes": true,
"throwConfigExceptions": false,
"targets": {
"EventLog": {
"type": "EventLog",
"source": "WebhookService",
"layout": "${longdate} ${logger} ${message}${onexception:${newline}${exception:maxInnerExceptionLevel=10:format=shortType,message,stacktrace:separator=*:innerExceptionSeparator= }}"
},
"azureLogFile": {
"type": "File",
"fileName": "./${shortdate}-IdentityApplication.log",
"layout": "${longdate} - ${level:uppercase=true} - ${logger} ${message}${onexception:${newline}${exception:maxInnerExceptionLevel=10:format=shortType,message,stacktrace:separator=*:innerExceptionSeparator=&#[x9;}}",
"archiveEvery":"Day",
"maxArchiveFiles":"5"
}
},
"rules": [
{
"logger": "*",
"minLevel": "Info",
"writeTo": "azureLogFile"
}
]
},
- Add the above content into the below highlighted area session then save this file and do the IIS reset