I've got a function deployed to Azure using Dotnet Core 6.0. I'm trying to troubleshoot it and it doesn't seem like my ILogger logs are getting through to it. Those would be immensely useful.
Trigger details and Execution logs are appearing, but not my custom logging. My Startup class is basically empty. Is there something additional that I need to add to my function to get my ILogger logs into AI?
The function, abbreviated.
public class QueueWorker
{
private readonly ILogger<QueueWorker> _logger;
public QueueWorker(ILogger<QueueWorker> logger)
{
_logger = logger;
}
[FunctionName("QueueWorker")]
public async Task Run([ServiceBusTrigger("incoming", Connection = "EventBusConnection")] string serialMailEvent)
{
_logger.LogInformation("Processing Event");
}
}
host.json
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": false,
"excludedTypes": "Request"
}
},
"fileLoggingMode": "always",
"logLevel": {
"default": "Trace",
"Host": "Trace",
"Function": "Trace",
"Host.Aggregator": "Trace"
}
}
}