void timer_Elapsed(object sender, ElapsedEventArgs e) { string infoMsg = String.Format("Date : {0} Time : {1}", DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongTimeString()); log.Info(infoMsg + " REQUESTED BY WINDOWS SERVICE"); try { NotificationController controller = new NotificationController(); controller.Check(); } catch (Exception ex) { log.Error("" + ex.Message.ToString()); } log.Info(infoMsg + " RESPONDED BY WINDOWS SERVICE"); }