Example #1
0
        private void UpdateTimingProfile()
        {
            CMSLogBehavior profile        = logConfig.LoggingBehavior;
            bool           sendPCMessages = logConfig.EnablePCMessages;

            timingProfile.Clear();
            if (profile.Equals(CMSLogBehavior.NoLogging))
            {
            }
            else if (profile.Equals(CMSLogBehavior.OnlyInfrequentLogging))
            {
                timingProfile.UnConnectedTimings[new CMSLogAtt(false, false, false)] = 0;
                timingProfile.ConnectedTimings[new CMSLogAtt(false, false, false)]   = 0;

                if (sendPCMessages)
                {
                    timingProfile.UnConnectedTimings[new CMSLogAtt(false, false, true)] = 15000;
                    timingProfile.ConnectedTimings[new CMSLogAtt(false, false, true)]   = 15000;
                }
            }
            else if (profile.Equals(CMSLogBehavior.AllSmallMessages))
            {
                timingProfile.UnConnectedTimings[new CMSLogAtt(false, false, false)] = 0;
                timingProfile.UnConnectedTimings[new CMSLogAtt(true, false, false)]  = 250;
                timingProfile.ConnectedTimings[new CMSLogAtt(false, false, false)]   = 0;
                timingProfile.ConnectedTimings[new CMSLogAtt(true, false, false)]    = 100;

                if (sendPCMessages)
                {
                    timingProfile.UnConnectedTimings[new CMSLogAtt(false, false, true)] = 15000;
                    timingProfile.UnConnectedTimings[new CMSLogAtt(true, false, true)]  = 15000;
                    timingProfile.ConnectedTimings[new CMSLogAtt(false, false, true)]   = 15000;
                    timingProfile.ConnectedTimings[new CMSLogAtt(true, false, true)]    = 15000;
                }
            }
            else if (profile.Equals(CMSLogBehavior.FullLogging))
            {
                timingProfile.UnConnectedTimings[new CMSLogAtt(false, false, false)] = 0;
                timingProfile.UnConnectedTimings[new CMSLogAtt(false, true, false)]  = 0;
                timingProfile.UnConnectedTimings[new CMSLogAtt(true, false, false)]  = 250;
                timingProfile.ConnectedTimings[new CMSLogAtt(false, false, false)]   = 0;
                timingProfile.ConnectedTimings[new CMSLogAtt(false, true, false)]    = 0;
                timingProfile.ConnectedTimings[new CMSLogAtt(true, false, false)]    = 100;
                timingProfile.ConnectedTimings[new CMSLogAtt(true, true, false)]     = 30000;

                if (sendPCMessages)
                {
                    timingProfile.UnConnectedTimings[new CMSLogAtt(false, false, true)] = 15000;
                    timingProfile.UnConnectedTimings[new CMSLogAtt(false, true, true)]  = 15000;
                    timingProfile.UnConnectedTimings[new CMSLogAtt(true, false, true)]  = 15000;
                    timingProfile.ConnectedTimings[new CMSLogAtt(false, false, true)]   = 15000;
                    timingProfile.ConnectedTimings[new CMSLogAtt(false, true, true)]    = 15000;
                    timingProfile.ConnectedTimings[new CMSLogAtt(true, false, true)]    = 15000;
                    timingProfile.ConnectedTimings[new CMSLogAtt(true, true, true)]     = 30000;
                }
            }
        }
 public void UpdateUserControlledLogConfigInfo(CMSLogConfig logConfig)
 {
     LogServer        = logConfig.LogServer;
     EnablePCMessages = logConfig.EnablePCMessages;
     LoggingBehavior  = logConfig.LoggingBehavior;
     ProxyServer      = logConfig.ProxyServer;
     ProxyUsername    = logConfig.ProxyUsername;
     ProxyPassword    = logConfig.ProxyPassword;
 }