Exemplo n.º 1
0
        public static void DebugWriteTo(
            Interpreter interpreter,
            string value,
            bool force
            )
        {
            if (!IsTracePossible())
            {
                return;
            }

            string traceFormat = GetTraceFormat();

            if (traceFormat == null)
            {
                return;
            }

            bool traceDateTime;
            bool tracePriority;
            bool traceAppDomain;
            bool traceInterpreter;
            bool traceThreadId;
            bool traceMethod;

            GetTraceFormatFlags(
                out traceDateTime, out tracePriority, out traceAppDomain,
                out traceInterpreter, out traceThreadId, out traceMethod);

            DebugOps.WriteTo(interpreter, FormatOps.TraceOutput(traceFormat,
                                                                traceDateTime ? (DateTime?)TimeOps.GetNow() : null, null,
                                                                traceAppDomain ? AppDomainOps.GetCurrent() : null,
                                                                traceInterpreter ? interpreter : null, traceThreadId ?
                                                                (int?)GlobalState.GetCurrentSystemThreadId() : null,
                                                                value, traceMethod), force);
        }