Beispiel #1
0
        // TODO: reconsider the pattern of using a static constructor
        static DefaultLogger()
        {
            var ts = new TraceSource("SmartSync",
                                     SourceLevels.Critical |
                                     SourceLevels.Error |
                                     SourceLevels.Warning |
                                     SourceLevels.Verbose);

            LogEvent = EventLoggerFactory.CreateEventLogger <ILogEvent>(ts);
        }
Beispiel #2
0
        public static T CreateEventLogger <T>(TraceSource ts)
        {
            var proxy = new EventLoggerFactory(typeof(T), ts);

            return((T)proxy.GetTransparentProxy());
        }