예제 #1
0
 /// <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));
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of <see cref="SimpleConsoleLoggerProvider"/>
 /// </summary>
 public SimpleConsoleLoggerProvider(SimpleConsoleLoggerConfiguration loggerOptions)
 {
     m_LoggerOptions = loggerOptions ?? throw new ArgumentNullException(nameof(loggerOptions));
 }
예제 #3
0
 /// <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);
 }