Есть ли способ прочитать настройки хоста в файле хоста. json во время выполнения? Допустим, у вас есть такой файл: включены тоже. При запуске вы должны получить те же значения, что и в консоли:
[28-01-2020 09:16:06] LoggerFilterOptions
[28-01-2020 09:16:06] {
[28-01-2020 09:16:06] "MinLevel": "None",
[28-01-2020 09:16:06] "Rules": [
[28-01-2020 09:16:06] {
[28-01-2020 09:16:06] "ProviderName": null,
[28-01-2020 09:16:06] "CategoryName": null,
[28-01-2020 09:16:06] "LogLevel": null,
[28-01-2020 09:16:06] "Filter": "<AddFilter>b__0"
[28-01-2020 09:16:06] },
[28-01-2020 09:16:06] {
[28-01-2020 09:16:06] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[28-01-2020 09:16:06] "CategoryName": null,
[28-01-2020 09:16:06] "LogLevel": "None",
[28-01-2020 09:16:06] "Filter": null
[28-01-2020 09:16:06] },
[28-01-2020 09:16:06] {
[28-01-2020 09:16:06] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[28-01-2020 09:16:06] "CategoryName": null,
[28-01-2020 09:16:06] "LogLevel": null,
[28-01-2020 09:16:06] "Filter": "<AddFilter>b__0"
[28-01-2020 09:16:06] }
[28-01-2020 09:16:06] ]
[28-01-2020 09:16:06] }
[28-01-2020 09:16:06] FunctionResultAggregatorOptions
[28-01-2020 09:16:06] {
[28-01-2020 09:16:06] "BatchSize": 1000,
[28-01-2020 09:16:06] "FlushTimeout": "00:00:30",
[28-01-2020 09:16:06] "IsEnabled": true
[28-01-2020 09:16:06] }
[28-01-2020 09:16:06] SingletonOptions
[28-01-2020 09:16:06] {
[28-01-2020 09:16:06] "LockPeriod": "00:00:15",
[28-01-2020 09:16:06] "ListenerLockPeriod": "00:00:15",
[28-01-2020 09:16:06] "LockAcquisitionTimeout": "10675199.02:48:05.4775807",
[28-01-2020 09:16:06] "LockAcquisitionPollingInterval": "00:00:05",
[28-01-2020 09:16:06] "ListenerLockRecoveryPollingInterval": "00:01:00"
[28-01-2020 09:16:06] }
[28-01-2020 09:16:06] ServiceBusOptions
[28-01-2020 09:16:06] {
[28-01-2020 09:16:06] "PrefetchCount": 0,
[28-01-2020 09:16:06] "MessageHandlerOptions": {
[28-01-2020 09:16:06] "AutoComplete": true,
[28-01-2020 09:16:06] "MaxAutoRenewDuration": "00:05:00",
[28-01-2020 09:16:06] "MaxConcurrentCalls": 192
[28-01-2020 09:16:06] },
[28-01-2020 09:16:06] "SessionHandlerOptions": {
[28-01-2020 09:16:06] "AutoComplete": true,
[28-01-2020 09:16:06] "MaxAutoRenewDuration": "00:05:00",
[28-01-2020 09:16:06] "MaxConcurrentSessions": 2000,
[28-01-2020 09:16:06] "MessageWaitTimeout": "00:01:00"
[28-01-2020 09:16:06] },
[28-01-2020 09:16:06] "BatchOptions": {
[28-01-2020 09:16:06] "MaxMessageCount": 1000,
[28-01-2020 09:16:06] "OperationTimeout": "00:01:00",
[28-01-2020 09:16:06] "AutoComplete": true
[28-01-2020 09:16:06] }
[28-01-2020 09:16:06] }
[28-01-2020 09:16:06] HttpOptions
[28-01-2020 09:16:06] {
[28-01-2020 09:16:06] "DynamicThrottlesEnabled": false,
[28-01-2020 09:16:06] "MaxConcurrentRequests": -1,
[28-01-2020 09:16:06] "MaxOutstandingRequests": -1,
[28-01-2020 09:16:06] "RoutePrefix": "api"
[28-01-2020 09:16:06] }