Exemple #1
0
        // //////////////////////////////////////////////////////////
        // Implementation - Public Methods
        // //////////////////////////////////////////////////////////
        public void AddTarget(LoggingLevel level, LogFileTarget target)
        {
            if (_lockdown)
            {
                throw new InvalidOperationException("Cannot modify config after initialization");
            }

            lock (_bindingsLock)
            {
                _bindings.Add(new TargetBinding(level, target));
            }
        }
Exemple #2
0
 // //////////////////////////////////////////////////////////
 // CTOR
 // //////////////////////////////////////////////////////////
 internal TargetBinding(LoggingLevel level, LogFileTarget target)
 {
     Level  = level;
     Target = target;
 }