Created
April 5, 2017 01:23
-
-
Save c0shea/43e51c671681d6a1a3d85d9be0e93ea1 to your computer and use it in GitHub Desktop.
This file contains 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 static class LoggerExtensions | |
{ | |
public static void Trace(this Logger logger, Exception exception, LogMessageGenerator messageFunc) | |
{ | |
if (logger.IsTraceEnabled) | |
{ | |
if (messageFunc == null) | |
{ | |
throw new ArgumentNullException("messageFunc"); | |
} | |
logger.Trace(exception, messageFunc()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment