Skip to content

Instantly share code, notes, and snippets.

@Dillie-O
Created November 29, 2012 23:13
Show Gist options
  • Save Dillie-O/4172572 to your computer and use it in GitHub Desktop.
Save Dillie-O/4172572 to your computer and use it in GitHub Desktop.
Log4Net ClientLog Controller
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using log4net;
namespace MyApp.Web.Controllers
{
public class ClientLogController : Controller
{
private static readonly ILog Log = LogManager.GetLogger(typeof(ClientLogController).FullName);
public void LogDebugEvent(string message)
{
Log.Debug(message);
}
public void LogInfoEvent(string message)
{
Log.Info(message);
}
public void LogWarnEvent(string message)
{
Log.Warn(message);
}
public void LogErrorEvent(string message)
{
Log.Error(message);
}
public void LogFatalEvent(string message)
{
Log.Fatal(message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment