Skip to content

Instantly share code, notes, and snippets.

@hudo
Last active October 14, 2015 22:08
Show Gist options
  • Select an option

  • Save hudo/0883c150286ff2415f68 to your computer and use it in GitHub Desktop.

Select an option

Save hudo/0883c150286ff2415f68 to your computer and use it in GitHub Desktop.
Logger Extension
static class LoggerExtension
{
public static void InfoDiagnostics(this ILogger logger, string message, params object[] data)
{
logger.Log(LogLevel.Info, LogType.Diagnostics, message, data);
}
public static void InfoOperations(this ILogger logger, string message, params object[] data)
{
logger.Log(LogLevel.Info, LogType.Operations, message, data);
}
public static void ErrorDiagnostics(this ILogger logger, string message, params object[] data)
{
logger.Log(LogLevel.Error, LogType.Diagnostics, message, data);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment