I want to use Microsoft.Extensions.Logging in order to log stuff to the console. I have set it up like this:
static void Main()
{
ILoggerFactory loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
ILogger logger = loggerFactory.CreateLogger<Program>();
logger.LogInformation("Current directory {0}", Directory.GetCurrentDirectory());
}
However, nothing is written to the console.