I have an azure function:
public void Run([TimerTrigger("0 0 0 * * *", RunOnStartup =true)]TimerInfo myTimer, ILogger log)
{
using (logger.BeginScope(properties))
{
logger.LogTrace(message);
}
}
Dictionary<string, object> _props = new Dictionary<string, object> { { "service", "exchange.rates.procces" } };
As you can see I add custom properties by providing a dictionary (properties) to BeginScope. Is there anyway to add the dictionary to the logger, so I do not have to provide the dictionary for each call? The logger write to Application Insigths.