static void Main(string[] args) { Console.CancelKeyPress += new ConsoleCancelEventHandler(Console_CancelKeyPress); PrepareLog(); LoggerOrchestrator.Start(); ConfigureLogsToWrite(); jmgr.Start(); Console.WriteLine("Press Ctrl+C to exit!"); while (!stoprequested) { } Console.WriteLine("Graceful shut down code here..."); jmgr.Stop(); LoggerOrchestrator.Stop(); Console.ReadKey(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { LoggerOrchestrator.Stop(); }