public virtual void RemoveAllAppenders() { lock (this) { if (this.m_appenderAttachedImpl != null) { this.m_appenderAttachedImpl.RemoveAllAppenders(); this.m_appenderAttachedImpl = null; } } }
public void RemoveAllAppenders() { AsyncAppender appender = this; lock (appender) { if (this.appenderAttachedImpl_0 != null) { this.appenderAttachedImpl_0.RemoveAllAppenders(); this.appenderAttachedImpl_0 = null; } } }
/// <summary> /// Adds an <see cref="IAppender" /> to the list of appenders of this /// instance. /// </summary> /// <param name="newAppender">The <see cref="IAppender" /> to add to this appender.</param> /// <remarks> /// <para> /// If the specified <see cref="IAppender" /> is already in the list of /// appenders, then it won't be added again. /// </para> /// </remarks> public virtual void AddAppender(IAppender newAppender) { if (newAppender == null) { throw new ArgumentNullException("newAppender"); } lock (this) { if (m_appenderAttachedImpl == null) { m_appenderAttachedImpl = new AppenderAttachedImpl(); } m_appenderAttachedImpl.AddAppender(newAppender); } }
public void AddAppender(IAppender appender) { if (appender == null) { throw new ArgumentNullException("appender"); } lock (_lockObject) { if (_appenderAttachedImpl == null) { _appenderAttachedImpl = new AppenderAttachedImpl(); } _appenderAttachedImpl.AddAppender(appender); } }
/// <summary> /// Remove all previously added appenders from this Logger instance. /// </summary> /// <remarks> /// <para> /// Remove all previously added appenders from this Logger instance. /// </para> /// <para> /// This is useful when re-reading configuration information. /// </para> /// </remarks> public virtual void RemoveAllAppenders() { m_appenderLock.AcquireWriterLock(); try { if (m_appenderAttachedImpl != null) { m_appenderAttachedImpl.RemoveAllAppenders(); m_appenderAttachedImpl = null; } } finally { m_appenderLock.ReleaseWriterLock(); } }
public void AddAppender(IAppender newAppender) { if (newAppender == null) { throw new ArgumentNullException("newAppender"); } AsyncAppender appender = this; lock (appender) { if (this.appenderAttachedImpl_0 == null) { this.appenderAttachedImpl_0 = new AppenderAttachedImpl(); } this.appenderAttachedImpl_0.AddAppender(newAppender); } }
/// <summary> /// Add <paramref name="newAppender"/> to the list of appenders of this /// Logger instance. /// </summary> /// <param name="newAppender">An appender to add to this logger</param> /// <remarks> /// <para> /// Add <paramref name="newAppender"/> to the list of appenders of this /// Logger instance. /// </para> /// <para> /// If <paramref name="newAppender"/> is already in the list of /// appenders, then it won't be added again. /// </para> /// </remarks> public virtual void AddAppender(IAppender newAppender) { if (newAppender == null) { throw new ArgumentNullException("newAppender"); } m_appenderLock.AcquireWriterLock(); try { if (m_appenderAttachedImpl == null) { m_appenderAttachedImpl = new AppenderAttachedImpl(); } m_appenderAttachedImpl.AddAppender(newAppender); } finally { m_appenderLock.ReleaseWriterLock(); } }