示例#1
0
        private bool GetIsInstrumentationEnabled()
        {
            Random random            = new Random();
            double num               = (double)random.Next(0, 100000) / 100000.0;
            double configDoubleValue = AppConfigLoader.GetConfigDoubleValue("ClientInstrumentationProbability", 0.0, 1.0, 1.0);

            return(num < configDoubleValue);
        }
 // Token: 0x0600254A RID: 9546 RVA: 0x000875BC File Offset: 0x000857BC
 public OwaServerTraceLogConfiguration()
 {
     this.IsLoggingEnabled           = AppConfigLoader.GetConfigBoolValue("OWAIsServerTraceLoggingEnabled", true);
     this.LogPath                    = AppConfigLoader.GetConfigStringValue("OWATraceLogPath", OwaServerTraceLogConfiguration.DefaultLogPath);
     this.MaxLogAge                  = AppConfigLoader.GetConfigTimeSpanValue("OWATraceMaxLogAge", TimeSpan.Zero, TimeSpan.MaxValue, TimeSpan.FromDays(5.0));
     this.MaxLogDirectorySizeInBytes = (long)OwaAppConfigLoader.GetConfigByteQuantifiedSizeValue("OWATraceMaxLogDirectorySize", ByteQuantifiedSize.FromGB(1UL)).ToBytes();
     this.MaxLogFileSizeInBytes      = (long)OwaAppConfigLoader.GetConfigByteQuantifiedSizeValue("OWATraceMaxLogFileSize", ByteQuantifiedSize.FromMB(10UL)).ToBytes();
     this.OwaTraceLoggingThreshold   = AppConfigLoader.GetConfigDoubleValue("OwaTraceLoggingThreshold", 0.0, 0.0, 0.0);
 }