예제 #1
0
        public LogInspector()
        {
            Capacity     = DefaultCapacity;
            Threshold    = LogInspectorLevel.Debug;
            LoggerPrefix = null;

            LastSnapshot = new LogSnapshot(DefaultCapacity, DateTime.Now);
        }
예제 #2
0
        /// <summary>
        /// Take a snapshot of the captured logging events
        /// while attached to an event source.
        /// </summary>
        public void TakeSnapshot()
        {
            if (_appender == null)
            {
                throw new InvalidOperationException("Not attached");
            }

            LastSnapshot = _appender.Snapshot();
        }