summaryrefslogtreecommitdiff
path: root/src/Notepad/Infrastructure/Logging/Log.cs
blob: e8a3b4c7186f6130a522f32ffdc82fa47621ff7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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));
            }
        }
    }
}