Esempio n. 1
0
        // GET
        public IActionResult Index()
        {
            var log = _loggingProvider.GetLogger <HomeController>();

            log.LogInformation("Nice @ {$Date}");
            return(Content("Nice"));
        }
Esempio n. 2
0
 /// <summary>
 /// Create a new instance of <see cref="MicrosoftLoggerWrapper"/>
 /// </summary>
 /// <param name="loggerServiceProvider"></param>
 /// <param name="categoryName"></param>
 /// <exception cref="ArgumentNullException"></exception>
 public MicrosoftLoggerWrapper(ILoggingServiceProvider loggerServiceProvider, string categoryName)
 {
     if (loggerServiceProvider == null)
     {
         throw new ArgumentNullException(nameof(loggerServiceProvider));
     }
     _logger = loggerServiceProvider.GetLogger(categoryName);
 }
Esempio n. 3
0
 /// <inheritdoc />
 public PostgreSqlLoggerProxy(ILoggingServiceProvider loggingServiceProvider, string categoryName)
 {
     if (loggingServiceProvider is null)
     {
         throw new ArgumentNullException(nameof(loggingServiceProvider));
     }
     _logger       = loggingServiceProvider.GetLogger(categoryName);
     _minimumLevel = _logger.MinimumLevel;
 }
 /// <inheritdoc />
 public MicrosoftLoggerAdapter(ILoggingServiceProvider loggerServiceProvider) : base(loggerServiceProvider?.GetLogger <T>())
 {
 }
 /// <inheritdoc />
 public INHibernateLogger LoggerFor(string keyName)
 {
     return(new NHibernateLoggerWrapper(_loggingServiceProvider.GetLogger(keyName, _filter, LogEventSendMode.Automatic, _renderingOptions)));
 }
Esempio n. 6
0
 public global::Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName)
 {
     return(new EfCoreLoggerWrapper(_loggingServiceProvider.GetLogger(categoryName, _filter, LogEventSendMode.Automatic, _upstreamRenderingOptions)));
 }
 /// <inheritdoc />
 public AspNetCoreLoggerWrapper(ILoggingServiceProvider provider) : base(provider?.GetLogger <T>())
 {
 }
Esempio n. 8
0
 public global::Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName)
 {
     return(new MicrosoftLoggerWrapper(_loggingServiceProvider.GetLogger(categoryName)));
 }
Esempio n. 9
0
 /// <inheritdoc />
 public PostgreSqlLoggerProxy(ILoggingServiceProvider loggerServiceProvider) : base(loggerServiceProvider?.GetLogger <T>())
 {
 }