Example #1
0
        private static void LogError(string msg)
        {
            msg = LogAssist.CheckToBreakIntoDebugger(LogAssist.PrefixMemUsage(LogAssist.AppendStackTrace(msg)));
            ILog l = log;

            if (l != null)
            {
                l.Error(msg);
            }
            else
            {
                BufferMessage(msg);
            }

#if TEST
            object l1 = new object();
            object l2 = new object();

            // Utilities.LockPerfTimer l1_clk = Utilities.LockPerfChecker.Start();
            lock (l1)
            {
                // l1_clk.LockPerfTimerStop();
                msg += "x";
                // Utilities.LockPerfTimer l2_clk = Utilities.LockPerfChecker.Start();
                System.Threading.Thread.Sleep(10 * 1000);
                // l2_clk.LockPerfTimerStop();
                msg += "x";
            }
#endif
        }
Example #2
0
        private static void LogWarn(string msg)
        {
            msg = LogAssist.CheckToBreakIntoDebugger(LogAssist.PrefixMemUsage(LogAssist.AppendStackTrace(msg)));
            ILog l = log;

            if (l != null)
            {
                l.Warn(msg);
            }
            else
            {
                BufferMessage(msg);
            }
        }