Example #1
0
        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);
        }
Example #2
0
 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;
         }
     }
 }
Example #3
0
 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;
         }
     }
 }
Example #4
0
 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;
         }
     }
 }
Example #5
0
        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
        }
Example #6
0
 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;
         }
     }
 }