static Logger() { //Initializes the empty object of StackTraceDetails LogStackTrace.Initialize(); LogStackMessages.Initialize(); GrowStackDisposal(1); s_logger = new LoggerInternal(out s_logger); Console = new LogSubscriptionConsole(); FileWriter = new LogSubscriptionFileWriter(1000); AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Log = CreatePublisher(typeof(Logger), MessageClass.Component); Log.InitialStackTrace = LogStackTrace.Empty; EventFirstChanceException = Log.RegisterEvent(MessageLevel.NA, MessageFlags.SystemHealth, "First Chance App Domain Exception", 30, MessageRate.PerSecond(30), 1000); EventAppDomainException = Log.RegisterEvent(MessageLevel.Critical, MessageFlags.SystemHealth, "Unhandled App Domain Exception"); EventSwallowedException = Log.RegisterEvent(MessageLevel.Debug, MessageFlags.None, "Exception was Swallowed", 30, MessageRate.PerSecond(30), 1000); ShutdownHandler.Initialize(); }