/// <summary> /// Initializes a new instance of <see cref="SimpleConsoleLogger"/> /// </summary> public SimpleConsoleLogger(SimpleConsoleLoggerConfiguration loggerOptions, string?categoryName) { m_CategoryName = String.IsNullOrEmpty(categoryName) ? null : categoryName; m_LoggerOptions = loggerOptions ?? throw new ArgumentNullException(nameof(loggerOptions)); }
/// <summary> /// Initializes a new instance of <see cref="SimpleConsoleLoggerProvider"/> /// </summary> public SimpleConsoleLoggerProvider(SimpleConsoleLoggerConfiguration loggerOptions) { m_LoggerOptions = loggerOptions ?? throw new ArgumentNullException(nameof(loggerOptions)); }
/// <summary> /// Adds a <see cref="SimpleConsoleLoggerProvider"/> logging provider to the logger factory /// </summary> public static ILoggerFactory AddSimpleConsoleLogger(this ILoggerFactory loggerFactory, SimpleConsoleLoggerConfiguration configurtation) { loggerFactory.AddProvider(new SimpleConsoleLoggerProvider(configurtation)); return(loggerFactory); }