The documentation for ASP.NET Core 2.2 is here.
Firstly, enable Application Logging and choose the appropriate level:

This may be all you need to do to diagnose any problems. But if you want log messages and see them, install the Microsoft.Extensions.Logging.AzureAppServices NuGet package.
Then, configure logging:
using Microsoft.Extensions.Logging;
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureLogging(logging =>
{
logging.AddAzureWebAppDiagnostics();
})
.UseStartup<Startup>();
Now you can inject and use ILogger:
public Startup(IConfiguration configuration, ILogger<Startup> logger)
{
Configuration = configuration;
this.logger = logger;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
logger.LogWarning("Starting up");
Then in the Azure App Service, click on Log stream:
