NLog.Config.LoggingConfiguration.Dump C# (CSharp) Method

Dump() private method

private Dump ( ) : void
return void
        internal void Dump()
        {
            InternalLogger.Debug("--- NLog configuration dump. ---");
            InternalLogger.Debug("Targets:");
            foreach (Target target in this.targets.Values)
            {
                InternalLogger.Info("{0}", target);
            }

            InternalLogger.Debug("Rules:");
            foreach (LoggingRule rule in this.LoggingRules)
            {
                InternalLogger.Info("{0}", rule);
            }

            InternalLogger.Debug("--- End of NLog configuration dump ---");
        }

Usage Example

Example #1
0
        private static void Dump(LoggingConfiguration config)
        {
            if (!InternalLogger.IsDebugEnabled)
            {
                return;
            }

            config.Dump();
        }