summaryrefslogtreecommitdiff
path: root/src/Notepad/Infrastructure/Logging/Log.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Notepad/Infrastructure/Logging/Log.cs')
-rw-r--r--src/Notepad/Infrastructure/Logging/Log.cs15
1 files changed, 15 insertions, 0 deletions
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>(T typeToCreateLoggerFor) {
+ try {
+ return Resolve.DependencyFor<ILogFactory>().CreateFor(typeof (T));
+ }
+ catch {
+ return new Log4NetLogFactory().CreateFor(typeof (T));
+ }
+ }
+ }
+} \ No newline at end of file