Created
November 29, 2012 23:13
-
-
Save Dillie-O/4172572 to your computer and use it in GitHub Desktop.
Log4Net ClientLog Controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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