private static void Main(string[] args) { Logger.EnsureInitialized(); try { new Program().Run(args); } catch (Exception e) { System.Console.WriteLine(e.Message); Logger.Fatal(typeof(Program), string.Format("Failure in Job, bubbled to Batch Runner: {0}", Logger.SerializeException(e))); var sender = new LogFileToEmailSender(); sender.Send(string.Join(",", args)); Environment.ExitCode = 100; } }