public static void UseLogger(LogWriterFactory logger) { lock (_locker) { if (_logger != null) { _logger.Shutdown(); } _logger = null; _logger = logger; } }
public static void UseLogger(HostLoggerConfigurator configurator) { lock (_locker) { _configurator = configurator; LogWriterFactory logger = _configurator.CreateLogWriterFactory(); if (_logWriterFactory != null) { _logWriterFactory.Shutdown(); } _logWriterFactory = null; _logWriterFactory = logger; } }