Created
August 9, 2013 17:28
-
-
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
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
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