NLog.LogFactory.IsLoggingEnabled C# (CSharp) Method

IsLoggingEnabled() public method

Returns if logging is currently enabled.
Logging is enabled if the number of EnableLogging calls is greater than or equal to DisableLogging calls.
public IsLoggingEnabled ( ) : bool
return bool
        public bool IsLoggingEnabled()
        {
            return this.logsEnabled >= 0;
        }

Usage Example

Example #1
0
 /// <summary>
 /// Checks if logging is currently enabled.
 /// </summary>
 /// <returns><see langword="true" /> if logging is currently enabled, <see langword="false"/>
 ///     otherwise.</returns>
 /// <remarks>Logging is enabled if the number of <see cref="EnableLogging"/> calls is greater
 ///     than or equal to <see cref="DisableLogging"/> calls.</remarks>
 public static bool IsLoggingEnabled()
 {
     return(factory.IsLoggingEnabled());
 }
All Usage Examples Of NLog.LogFactory::IsLoggingEnabled