GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — NLog

NLog

Jump to bottom Edit New page
Damian Hickey edited this page May 31, 2013 · 1 revision
namespace EventStore.Logging.NLog
{
	using System;
	using global::NLog;
	using global::NLog.Config;

	public class NLogLogger : ILog
	{
		private static readonly LogFactory Factory = new LogFactory();
		private readonly Logger log;

		public NLogLogger(Type typeToLog)
		{
			this.log = Factory.GetLogger(typeToLog.FullName);
		}
		public NLogLogger(Type typeToLog, LoggingConfiguration configuration)
		{
			this.log = new LogFactory(configuration).GetLogger(typeToLog.FullName);
		}

		public virtual void Verbose(string message, params object[] values)
		{
			if (this.log.IsTraceEnabled)
				this.log.Trace(message, values);
		}
		public virtual void Debug(string message, params object[] values)
		{
			if (this.log.IsDebugEnabled)
				this.log.Debug(message, values);
		}
		public virtual void Info(string message, params object[] values)
		{
			if (this.log.IsInfoEnabled)
				this.log.Info(message, values);
		}
		public virtual void Warn(string message, params object[] values)
		{
			if (this.log.IsWarnEnabled)
				this.log.Warn(message, values);
		}
		public virtual void Error(string message, params object[] values)
		{
			if (this.log.IsErrorEnabled)
				this.log.Error(message, values);
		}
		public virtual void Fatal(string message, params object[] values)
		{
			if (this.log.IsFatalEnabled)
				this.log.Fatal(message, values);
		}
	}
}
Add a custom footer
  1. Home
  2. Quick Start
  3. Architectural Overview
  4. Transactional Integrity
  5. Supported Persistence Engines
  • Required permissions on persistence back ends
  • SQL Server Isolation Levels
  1. Logging
  • Log4Net
  • NLog
  1. Transaction Support
  2. Building
  3. Running Persistence Tests
  4. Statement on strong naming
  5. License

Clone this wiki locally

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.