Created
October 28, 2012 01:13
-
-
Save SimonCropp/3967092 to your computer and use it in GitHub Desktop.
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 | |
public class Log | |
{ | |
public static Log With | |
{ | |
get | |
{ | |
throw new NotImplementedException(); | |
} | |
} | |
public void Debug(string message) | |
{ | |
throw new NotImplementedException(); | |
} | |
} | |
Before weaving | |
public class ClassWithLogging | |
{ | |
void MyMethod() | |
{ | |
Log.With.Debug("TheMessage"); | |
} | |
} | |
After weaving | |
public class ClassWithLogging | |
{ | |
static Logger logger = LogManager.GetLogger("ClassWithLogging"); | |
void MyMethod() | |
{ | |
logger.Debug("Method:MyMethod, Line:3, Message: 'TheMessage'"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment