Example #1
0
        private void LogCompletionStatus()
        {
            var logger = LogManager.GetCurrentClassLogger();

            logger.Info("JobCompletionStatus(handle: {0}): Destroy()", handle);
            foreach (var completionMsg in jobObject.GetQueuedCompletionStatus().Distinct())
            {
                switch (completionMsg)
                {
                case JobObject.CompletionMsg.NotificationLimit:
                    var jolvi = jobObject.GetLimitViolationInformation();
                    logger.Info("JobCompletionStatus(handle: {0}): LimitViolationInformation : {1}", handle, jolvi);
                    break;

                case JobObject.CompletionMsg.JobMemoryLimit:
                    logger.Info("JobCompletionStatus(handle: {0}): Reached job memory limit", handle);
                    break;

                case JobObject.CompletionMsg.ActiveProcessLimit:
                    logger.Info("JobCompletionStatus(handle: {0}): Reached active process limit", handle);
                    break;

                case JobObject.CompletionMsg.AbnormalExitProcess:
                    logger.Info("JobCompletionStatus(handle: {0}): Abnormal Exit Process", handle);
                    break;

                case JobObject.CompletionMsg.ActiveProcessZero:
                    logger.Info("JobCompletionStatus(handle: {0}): Active process count 0", handle);
                    break;

                default:
                    logger.Info("JobCompletionStatus(handle: {0}): CompletionCode = {1}", handle, completionMsg);
                    break;
                }
            }
        }