private static void WriteMSMQLog(DistributedLuceneActivity activity, MSMQLogStatusType statusType)
        {
            if (!MSMQLogEnabled)
                return;

            var pAct = activity as LuceneIndexingActivity;
            if (pAct == null)
                return;

            WriteMSMQLog(pAct.ActivityId, statusType, null);
        }
        internal static void WriteMSMQLog(int activityid, MSMQLogStatusType statusType, int? addedBy)
        {
            if (!MSMQLogEnabled)
                return;

            var status = statusType.ToString();
            var line = DateTime.Now.Ticks.ToString() + ";" + DateTime.Now.Hour.ToString() + ";" + DateTime.Now.Minute.ToString() + ";" + DateTime.Now.Second.ToString() + ";" + activityid.ToString() + ";" + status + ";";
            line += (addedBy.HasValue ? addedBy.Value.ToString() : string.Empty) + Environment.NewLine;
            lock (MSMQLogSync)
            {
                MSMQLog += line;
            }
        }
        internal static void WriteMSMQLog(int activityid, MSMQLogStatusType statusType, int?addedBy)
        {
            if (!MSMQLogEnabled)
            {
                return;
            }

            var status = statusType.ToString();
            var line   = DateTime.Now.Ticks.ToString() + ";" + DateTime.Now.Hour.ToString() + ";" + DateTime.Now.Minute.ToString() + ";" + DateTime.Now.Second.ToString() + ";" + activityid.ToString() + ";" + status + ";";

            line += (addedBy.HasValue ? addedBy.Value.ToString() : string.Empty) + Environment.NewLine;
            lock (MSMQLogSync)
            {
                MSMQLog += line;
            }
        }
        private static void WriteMSMQLog(DistributedLuceneActivity activity, MSMQLogStatusType statusType)
        {
            if (!MSMQLogEnabled)
            {
                return;
            }

            var pAct = activity as LuceneIndexingActivity;

            if (pAct == null)
            {
                return;
            }

            WriteMSMQLog(pAct.ActivityId, statusType, null);
        }