Exemple #1
0
        /// <summary>
        /// Serializes the messages.
        /// </summary>
        public virtual void SerializeMessages()
        {
            if (!_isStarted)
            {
                return;
            }

            // Log all Project Ids
            foreach (string msg in Messages)
            {
                Logger.Info(string.Format("{0,-18} : {1}", " ", msg));
            }

            // Log Exception if any
            if (null != Exceptions)
            {
                foreach (Exception ex in Exceptions)
                {
                    if (SyncLogger.EnableExceptionLog)
                    {
                        long   exceptionId = UniqueExceptionId;
                        string exception   = string.Format("**Exception({0})**", exceptionId);
                        Logger.Info(string.Format("{0,-18} : {1}", exception, ex.Message));
                        ExceptionLog.Dump(exceptionId, ex);
                    }
                    else
                    {
                        Logger.Info(string.Format("{0,-18} : {1})", "**Exception**", ex.Message));
                    }
                }
            }
        }