Reputation: 50
I'm using a group of durable functions to do some critical backend logic and orchetration and I would like them to write logs in the same file so I can make a better analysis. Right know my I'm using injected ILog instance with the log.Information method but each function write its own log file.
I'm also using application insights but there is much more information in the files than app insight becauseof the telemetry sampling.
Here is an example of my host.json file "version": "2.0", "logging": { "fileLoggingMode": "always", "logLevel": { "default": "Trace", "Host": "Trace", "Function": "Trace" }, "applicationInsights": { "samplingSettings": { "isEnabled": true, "maxTelemetryItemsPerSecond": 20 } } },
Is there a way to have a single log file?
Thanks
Upvotes: 0
Views: 575
Reputation: 811
How about a logging service that the functions can call? this would solve the problem of concurrent writes as only one service is editing the file. Secondly any new functions can just have the same logic added so it's quicker.
Upvotes: 0