public static Logger EnsureInitialized(HostConfigurationStore configStore) { Logger res = new Logger(); if (!s_isInitialized) { s_isInitialized = true; s_initTime = DateTime.Now; s_logger = configStore.GetLogger("EnableMIDebugLogger", "Microsoft.MIDebug.log"); if (s_logger != null) { s_isEnabled = true; } res.WriteLine("Initialized log at: " + s_initTime); } #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { s_isEnabled = true; } #endif return(res); }
public static void LoadMIDebugLogger(HostConfigurationStore configStore) { if (s_logger == null) { s_logger = configStore.GetLogger("EnableMIDebugLogger", "Microsoft.MIDebug.log"); 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; } } }
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; } } }
public static void EnsureInitialized(HostConfigurationStore configStore) { if (!s_isInitialized) { s_isInitialized = true; s_initTime = DateTime.Now; s_logger = configStore.GetLogger("EnableMIDebugLogger", "Microsoft.MIDebug.log"); if (s_logger != null) { s_isEnabled = true; } WriteLine("Initialized log at: " + s_initTime); } #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { s_isEnabled = true; } #endif }
public static void LoadMIDebugLogger(HostConfigurationStore configStore) { if (s_logger == null) { s_logger = configStore.GetLogger("EnableMIDebugLogger", "Microsoft.MIDebug.log"); if (s_logger != null) { s_isEnabled = true; } } }