如何使用 Microsoft.Extensions.Logging
public static void Main(string[] args = null) {
ILoggerFactory loggerFactory = new LoggerFactory().AddConsole().AddDebug();
ILogger logger = loggerFactory.CreateLogger<Program>();
logger.LogInformation( "This is a test of the emergency broadcast system."); }
详细参考:https://msdn.microsoft.com/magazine/mt694089