如何使用 Microsoft.Extensions.Logging public static void Main(string[] args = null) { ILoggerFactory loggerFactory = new LoggerFactory().AddConsole().AddDebug(); ILogger logger = loggerFactory.CreateLogger Program (); logger.LogInformat
如何使用
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
龙腾一族至尊龙骑