From 5ee1f55497a4e30322a56f133f897ecde1612967 Mon Sep 17 00:00:00 2001 From: mo Date: Sun, 4 Nov 2018 15:22:16 -0700 Subject: initial commit. --- .../Infrastructure/Extensions/LoggingExtensions.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/Notepad/Infrastructure/Extensions/LoggingExtensions.cs (limited to 'src/Notepad/Infrastructure/Extensions/LoggingExtensions.cs') diff --git a/src/Notepad/Infrastructure/Extensions/LoggingExtensions.cs b/src/Notepad/Infrastructure/Extensions/LoggingExtensions.cs new file mode 100644 index 0000000..a05e2fc --- /dev/null +++ b/src/Notepad/Infrastructure/Extensions/LoggingExtensions.cs @@ -0,0 +1,17 @@ +using System; +using Notepad.Infrastructure.Logging; + +namespace Notepad.Infrastructure.Extensions { + public static class LoggingExtensions { + public static void LogError(this Exception errorToLog) { + Log.For(errorToLog).Error(errorToLog); + } + + public static void LogInformational( + this T typeToCreateLoggerFor, + string formattedMessage, + params object[] arguments) { + Log.For(typeToCreateLoggerFor).Informational(formattedMessage, arguments); + } + } +} \ No newline at end of file -- cgit v1.2.3