// 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); }
public static T CreateEventLogger <T>(TraceSource ts) { var proxy = new EventLoggerFactory(typeof(T), ts); return((T)proxy.GetTransparentProxy()); }