Ejemplo n.º 1
0
        static public void Assert(bool b)
        {
            if (!b)
            {
                LogEntry(MasterLog.GetFileLog("Assert " + Thread.CurrentThread.ManagedThreadId + ".log"));

                Debug.Assert(b);

                throw new Exception("Assert failed");
            }
        }
Ejemplo n.º 2
0
        static public void Entry(ILog l, int logLevel, LogParam pr, string s, params object[] vars)
        {
            if (l == null)
                return;

            bool useConsole = (pr & LogParam.CONSOLE) != 0 && (pr & LogParam.NO_CONSOLE) == 0;
            bool writeIntoLog = l.LogLevel >= logLevel;

            if (!useConsole && !writeIntoLog)
                return;

            string timestamp = l.Timestamp ? GetTimestamp() : "";

            if (useConsole)
                MasterLog.ConsoleWrite(s, timestamp, true, vars);

            if (writeIntoLog)
                l.LogWriteLine(timestamp + s, vars);
        }
Ejemplo n.º 3
0
 static public void Console(string s, params object[] vars)
 {
     MasterLog.ConsoleWrite(s, GetTimestamp(), true, vars);
 }