In the following code, where is the error logged in Azure? Sometimes the cause of such an error is difficult to identify, and results in "Function host is not running.", I've not been able to find the logged exception.
I've worked around this before by writing my own try/catch logging to BlobStorage myself, however, I'd hope there's a more idiomatic way of obtaining the exception.
public class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
throw new Exception("Boom!");
ConfigureServices(builder.Services);
}
...
I've looked in the following places:
Diagnose and solve problems / Function App Down or Reporting Errors:
- Reports a stale error, doesn't seem to be updated each time the above error is raised.
AppInsights:
- "Your app is offline or the Application Insights SDK needs updating."
Kudu:
- D:\home\LogFiles\eventlog.xml - Can't see anything meaningful here
- D:\home\LogFiles\Application\Functions\Function\FunctionName\*.log - No files for today
- D:\home\LogFiles\Application\Functions\Host\*.log - No files for today
Storage account file shares:
- One modified with today's date
- /LogFiles/ - Empty
- /site/wwwroot/ - Empty