From 5ee1f55497a4e30322a56f133f897ecde1612967 Mon Sep 17 00:00:00 2001 From: mo Date: Sun, 4 Nov 2018 15:22:16 -0700 Subject: initial commit. --- src/Notepad/Infrastructure/Logging/Log.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/Notepad/Infrastructure/Logging/Log.cs (limited to 'src/Notepad/Infrastructure/Logging/Log.cs') diff --git a/src/Notepad/Infrastructure/Logging/Log.cs b/src/Notepad/Infrastructure/Logging/Log.cs new file mode 100644 index 0000000..e8a3b4c --- /dev/null +++ b/src/Notepad/Infrastructure/Logging/Log.cs @@ -0,0 +1,15 @@ +using Notepad.Infrastructure.Container; +using Notepad.Infrastructure.Logging.Log4NetLogging; + +namespace Notepad.Infrastructure.Logging { + public static class Log { + public static ILogger For(T typeToCreateLoggerFor) { + try { + return Resolve.DependencyFor().CreateFor(typeof (T)); + } + catch { + return new Log4NetLogFactory().CreateFor(typeof (T)); + } + } + } +} \ No newline at end of file -- cgit v1.2.3