i am facing a strange problem while developing an asp.net core application which is deployed to Microsoft Azure and runs there as an app-service. I target the full .net framework.
I am using Microsoft.Extensions.Logging
and the logs are working locally without a problem, but when deploying it to Microsoft Azure there are no logs at all. The LogStream windows stays empty and just shows the No new Trace in the last n minutes
output.
Things I already checked:
- Enabled Diagnostic Logs in the App-Service Settings
- Set the LogLevel there to Verbose
- Checked the LogFiles directory on the App-Service
Part of my appsettings.json
"Logging": {
"LogLevel": {
"Default": "Information"
}
I am then injecting the Logger instances to the controllers like this:
ILogger<FooBarClassName> myLogger;
public FooBarClassName(ILogger<FooBarClassName> logger)
{
myLogger = logger;
....
}
And use it like this:
void SomeMethod()
{
...
myLogger.LogInformation("Some Log Message");
...
}
Thanks for any help to solve this issue.
D:\Home
folder. Also, check stackoverflow.com/questions/48947739/… - Rui Jarimba