Skip to content

Instantly share code, notes, and snippets.

@csharpforevermore
Created August 9, 2013 17:28
Show Gist options
  • Save csharpforevermore/6195457 to your computer and use it in GitHub Desktop.
Save csharpforevermore/6195457 to your computer and use it in GitHub Desktop.
In Umbraco (or any other ASP.NET application using Log4Net, we can output to the log file using the following example. Example
public class Class1
{
private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public void MyMethod1()
{
// do something
Log.Debug("Example log message");
Log.Warn("This is a warning.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment