示例#1
0
        public TracingSniffer(string url, TracingLevel level, string from, string to)
        {
            _url            = url;
            _level          = level;
            _from           = from;
            _to             = to;
            _enabled        = true;
            _queueTracing   = new LazyQueue <TracingEvent>("TracingSniffer.Tracing", 32, 50, DequeueActionTracing);
            _queueSystemLog = new LazyQueue <SystemLogEvent>("TracingSniffer.SystemLog", 32, 50, DequeueActionSystemLog);

            _proxy = RpcProxyFactory.GetProxy <ITracingSniffer>(_url);
            // _proxy.ShutUp = true;
        }
示例#2
0
        static TracingManager()
        {
            _queueTracing = new LazyQueue<TracingEvent>("TracingManager.QueueTracing", 32, 50, TracingDequeueAction);
            _queueLog = new LazyQueue<SystemLogEvent>("TracingManager.QueueLog", 32, 50, SystemLogDequeueAction);
            _configSection = IICConfigSection.CreateDefault<TracingConfigSection>();
            _level = TracingLevel.Off;
            ReloadConfiguration();

            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledException);
            Trace.Listeners.Add(new DebugTraceListener());

            ObserverManager.RegisterObserver("Tracing", ObserveProc, ClearObserver);
        }
示例#3
0
        public void Dispose(bool disposing)
        {
            if (disposing)
            {
                // no managed
            }

            if (_queueTracing != null)
            {
                _queueTracing.Dispose();
                _queueTracing = null;
            }

            if (_queueSystemLog != null)
            {
                _queueSystemLog.Dispose();
                _queueSystemLog = null;
            }
        }