예제 #1
0
파일: Log.cs 프로젝트: zora/duplicati
 /// <summary>
 /// Closes the scope.
 /// </summary>
 /// <param name="scope">The scope to finish.</param>
 internal static void CloseScope(LogScope scope)
 {
     lock (m_lock)
     {
         if (CurrentScope == scope && scope != m_root)
         {
             CurrentScope = scope.Parent;
         }
         m_log_instances.Remove(scope.InstanceID);
     }
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Duplicati.Library.Logging.LogWrapper"/> class.
        /// </summary>
        /// <param name="self">The log instance to wrap.</param>
        public LogScope(ILog self, LogMessageType level, LogScope parent)
        {
            Log      = self;
            LogLevel = level;
            Parent   = parent;

            if (parent != null)
            {
                Logging.Log.StartScope(this);
            }
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Duplicati.Library.Logging.LogWrapper"/> class.
        /// </summary>
        /// <param name="self">The log instance to wrap.</param>
        /// <param name="filter">The log filter to use</param>
        public LogScope(ILogDestination self, ILogFilter filter, LogScope parent)
        {
            Parent = parent;

            m_log    = self;
            m_filter = filter;

            if (parent != null)
            {
                Logging.Log.StartScope(this);
            }
        }
예제 #4
0
파일: Log.cs 프로젝트: zora/duplicati
 /// <summary>
 /// Starts the scope.
 /// </summary>
 /// <param name="scope">The scope to start.</param>
 internal static void StartScope(LogScope scope)
 {
     CurrentScope = scope;
 }