public static void Reset() { HostLogger logger; if (CmdLogInfo.enabled) { logger = HostLogger.GetLoggerFromCmd(CmdLogInfo.logFile, CmdLogInfo.logToOutput); logger = Interlocked.Exchange(ref s_logger, logger); logger?.Close(); if (s_logger != null) { s_isEnabled = true; } } }
public static void LoadMIDebugLogger(HostConfigurationStore configStore) { if (s_logger == null) { if (CmdLogInfo.enabled) { // command configured log file s_logger = HostLogger.GetLoggerFromCmd(CmdLogInfo.logFile, CmdLogInfo.logToOutput); } else { // use default logging s_logger = configStore.GetLogger("EnableMIDebugLogger", "Microsoft.MIDebug.log"); } if (s_logger != null) { s_isEnabled = true; } } }