Sha256: cd8df7eddda4ed40fcb8fa1bc11d4f1a4d6a6d0a4a1433c65e4d50317125d4bc
Contents?: true
Size: 907 Bytes
Versions: 3
Compression:
Stored size: 907 Bytes
Contents
#if LOG4NET ILog logger = LogManager.GetLogger("somelogger"); #else Logger logger = LogManager.GetLogger("somelogger"); #endif // Case 1. No formatting: logger.Debug("This is a message without formatting."); // Case 2. One format parameter #if LOG4NET logger.Debug(String.Format("This is a message with {0} format parameter", 1)); #else logger.Debug("This is a message with {0} format parameter", 1); #endif // Case 3. Two format parameters #if LOG4NET logger.Debug(String.Format("This is a message with {0}{1} parameters", 2, "o")); #else logger.Debug("This is a message with {0}{1} parameters", 2, "o"); #endif // Case 4. Three format parameters #if LOG4NET logger.Debug(String.Format("This is a message with {0}{1}{2} parameters", "thr", 3, 3)); #else logger.Debug("This is a message with {0}{1}{2} parameters", "thr", 3, 3); #endif
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nlog-1.0.0.505.20100822 | docs/examples/web/benchmark_log4net.cs |
nlog-1.0.0.505 | docs/examples/web/benchmark_log4net.cs |
nlog-1.0.0.505-mswin32 | docs/examples/web/benchmark_log4net.cs |