summaryrefslogtreecommitdiff
path: root/src/Notepad/Infrastructure/Extensions/LoggingExtensions.cs
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2018-11-04 15:22:16 -0700
committermo <mo.khan@gmail.com>2018-11-04 15:22:16 -0700
commit5ee1f55497a4e30322a56f133f897ecde1612967 (patch)
treebf544e0879234c3623869627d8786776cb19b8e9 /src/Notepad/Infrastructure/Extensions/LoggingExtensions.cs
initial commit.HEADmaster
Diffstat (limited to 'src/Notepad/Infrastructure/Extensions/LoggingExtensions.cs')
-rw-r--r--src/Notepad/Infrastructure/Extensions/LoggingExtensions.cs17
1 files changed, 17 insertions, 0 deletions
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<T>(
+ this T typeToCreateLoggerFor,
+ string formattedMessage,
+ params object[] arguments) {
+ Log.For(typeToCreateLoggerFor).Informational(formattedMessage, arguments);
+ }
+ }
+} \ No newline at end of file