// Token: 0x060009C7 RID: 2503 RVA: 0x0002BE74 File Offset: 0x0002A074
 private void AppendInstance(string operation, string dn, DateTime whenReadUTC, long totalProcessingTime, long wcfGetProcessingTime, long wcfRemoveProcessingTime, long wcfPutProcessingTime, long adProcessingTime, bool isNewProxy, int retryCount, string objectType, string cachePerformanceTracker, Guid activityId, string callerInfo, string error)
 {
     if (!base.Initialized)
     {
         this.Initialize();
     }
     if (BaseDirectoryProtocolLog.LoggingEnabled && !this.protocolLogDisabled)
     {
         LogRowFormatter logRowFormatter = new LogRowFormatter(CacheProtocolLog.schema);
         logRowFormatter[1]  = CacheProtocolLog.instance.GetNextSequenceNumber();
         logRowFormatter[2]  = Globals.ProcessName;
         logRowFormatter[4]  = Globals.ProcessAppName;
         logRowFormatter[3]  = Globals.ProcessId;
         logRowFormatter[5]  = operation;
         logRowFormatter[6]  = totalProcessingTime;
         logRowFormatter[7]  = wcfGetProcessingTime;
         logRowFormatter[8]  = wcfPutProcessingTime;
         logRowFormatter[9]  = wcfRemoveProcessingTime;
         logRowFormatter[10] = adProcessingTime;
         logRowFormatter[11] = isNewProxy;
         logRowFormatter[12] = retryCount;
         logRowFormatter[13] = objectType;
         logRowFormatter[15] = whenReadUTC;
         logRowFormatter[14] = dn;
         logRowFormatter[16] = cachePerformanceTracker;
         logRowFormatter[17] = activityId;
         logRowFormatter[18] = callerInfo;
         logRowFormatter[19] = error;
         base.Logger.Append(logRowFormatter, 0);
     }
 }
Esempio n. 2
0
 internal EdgeSyncLogSession(EdgeSyncLog edgeSyncLog, LogRowFormatter row, EdgeSyncLoggingLevel loggingLevel)
 {
     this.edgeSyncLog  = edgeSyncLog;
     this.row          = row;
     this.loggingLevel = loggingLevel;
     this.row[2]       = 0;
 }
Esempio n. 3
0
 public static void Log(KeyValuePair <string, object>[] customData, LogRowFormatter logRow, out Stream storeStream)
 {
     storeStream = null;
     if (customData != null)
     {
         if (logRow == null)
         {
             throw new ArgumentNullException("logRow");
         }
         foreach (KeyValuePair <string, object> keyValuePair in customData)
         {
             if (!CustomDataLogger.customFieldMappingTable.ContainsKey(keyValuePair.Key))
             {
                 throw new ArgumentException(string.Format("Invalid custom field name {0}", keyValuePair.Key));
             }
             if (CustomDataLogger.customFieldMappingTable[keyValuePair.Key] != 16)
             {
                 logRow[CustomDataLogger.customFieldMappingTable[keyValuePair.Key]] = keyValuePair.Value;
             }
             else
             {
                 storeStream = (Stream)keyValuePair.Value;
             }
         }
     }
 }
Esempio n. 4
0
        public void LogCertificateInformation(CertificateInformation info)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info");
            }
            string          value           = (info.RootCertificate == null) ? string.Empty : info.RootCertificate.Format(false);
            LogRowFormatter logRowFormatter = new LogRowFormatter(this.logSchema);

            logRowFormatter[1]  = Environment.MachineName;
            logRowFormatter[2]  = info.StoreName;
            logRowFormatter[3]  = info.Version;
            logRowFormatter[4]  = info.Subject.Format(false);
            logRowFormatter[5]  = info.Issuer.Format(false);
            logRowFormatter[6]  = info.ValidFrom;
            logRowFormatter[7]  = info.ValidTo;
            logRowFormatter[8]  = info.Thumbprint;
            logRowFormatter[9]  = info.SignatureAlgorithm;
            logRowFormatter[10] = info.PublicKeySize;
            logRowFormatter[11] = info.SerialNumber;
            logRowFormatter[12] = value;
            logRowFormatter[13] = info.SubjectKeyIdentifier;
            logRowFormatter[14] = info.BasicConstraints;
            logRowFormatter[15] = info.KeyUsage;
            logRowFormatter[16] = info.EnhancedKeyUsage;
            logRowFormatter[17] = info.ComponentOwner;
            this.exlog.Append(logRowFormatter, 0);
        }
Esempio n. 5
0
        public void AppendTo(StringBuilder buffer)
        {
            buffer.AppendFormat("{0},", this.Time);
            buffer.AppendFormat("{0},", Datapoint.GetCsvEscapedString(this.Id));
            buffer.AppendFormat("{0},", Datapoint.GetCsvEscapedString(this.Consumers));
            if (this.Keys == null && this.Values == null)
            {
                return;
            }
            string[] array  = this.Keys ?? Datapoint.EmptyStringArray;
            string[] array2 = this.Values ?? Datapoint.EmptyStringArray;
            KeyValuePair <string, string>[] array3 = new KeyValuePair <string, string> [Math.Max(array.Length, array2.Length)];
            for (int i = 0; i < Math.Min(array.Length, array2.Length); i++)
            {
                array3[i] = Datapoint.NewKeyValuePair(array[i], array2[i]);
            }
            if (array.Length > array2.Length)
            {
                for (int j = array3.Length; j < array.Length; j++)
                {
                    array3[j] = Datapoint.NewKeyValuePair(array[j], null);
                }
            }
            else
            {
                for (int k = array3.Length; k < array2.Length; k++)
                {
                    array3[k] = Datapoint.NewKeyValuePair(null, array2[k]);
                }
            }
            bool   flag;
            string text = LogRowFormatter.FormatCollection(array3, true, out flag);

            buffer.Append(flag ? Datapoint.GetCsvEscapedString(text) : text);
        }
Esempio n. 6
0
 // Token: 0x06000055 RID: 85 RVA: 0x00004698 File Offset: 0x00002898
 protected virtual void AppendLogRow(LogRowFormatter row)
 {
     if (!base.IsDisposed)
     {
         this.log.Append(row, 0);
     }
 }
Esempio n. 7
0
 internal static void Append(string operation, string resultCode, long processingTime, string failure, string lookupKey, string partnerId, string ipAddress, string diagnosticHeader, string transactionId)
 {
     lock (MservProtocolLog.logLock)
     {
         if (!MservProtocolLog.Initialized)
         {
             MservProtocolLog.Initialize(ExDateTime.UtcNow, Path.Combine(MservProtocolLog.GetExchangeInstallPath(), "Logging\\Mserv\\"), MservProtocolLog.defaultMaxRetentionPeriod, MservProtocolLog.defaultDirectorySizeQuota, MservProtocolLog.defaultPerFileSizeQuota, true);
         }
     }
     if (MservProtocolLog.Enabled)
     {
         LogRowFormatter logRowFormatter = new LogRowFormatter(MservProtocolLog.schema);
         logRowFormatter[1]  = MservProtocolLog.GetNextSequenceNumber();
         logRowFormatter[2]  = Globals.ProcessName;
         logRowFormatter[4]  = Globals.ProcessAppName;
         logRowFormatter[3]  = Globals.ProcessId;
         logRowFormatter[5]  = operation;
         logRowFormatter[7]  = processingTime;
         logRowFormatter[6]  = resultCode;
         logRowFormatter[8]  = failure;
         logRowFormatter[9]  = lookupKey;
         logRowFormatter[10] = partnerId;
         logRowFormatter[11] = ipAddress;
         logRowFormatter[12] = diagnosticHeader;
         logRowFormatter[13] = transactionId;
         MservProtocolLog.log.Append(logRowFormatter, 0);
     }
 }
Esempio n. 8
0
        public string[] Serialize()
        {
            if (!this.Enabled || this.data == null)
            {
                return(null);
            }
            string[] array = new string[this.data.Count];
            int      num   = 0;
            bool     flag  = false;

            foreach (IEnumerable <KeyValuePair <string, object> > enumerable in this.data)
            {
                array[num] = LogRowFormatter.FormatCollection(enumerable, out flag);
                if (flag)
                {
                    byte[] array2 = Utf8Csv.EncodeAndEscape(array[num]);
                    if (array2 == null)
                    {
                        return(null);
                    }
                    array[num] = Encoding.UTF8.GetString(array2);
                }
                num++;
            }
            return(array);
        }
Esempio n. 9
0
 internal static void Append(LogRowFormatter row)
 {
     if (ProtocolLog.Enabled)
     {
         ProtocolLog.log.Append(row, 0);
     }
 }
Esempio n. 10
0
            // Token: 0x060005B6 RID: 1462 RVA: 0x0001BD60 File Offset: 0x00019F60
            internal void LogDatabaseEvent(string assistantName, string databaseName, DatabaseSlaEventType eventType, Exception exception = null)
            {
                if (!base.ShouldLog())
                {
                    return;
                }
                LogRowFormatter logRowFormatter = new LogRowFormatter(base.LogSchema);

                logRowFormatter[1] = this.ServerName;
                logRowFormatter[2] = (assistantName ?? string.Empty);
                logRowFormatter[3] = (databaseName ?? string.Empty);
                logRowFormatter[4] = eventType.ToString();
                logRowFormatter[5] = ((exception != null) ? exception.GetType().ToString() : string.Empty);
                logRowFormatter[6] = ((exception != null && exception.InnerException != null) ? exception.InnerException.GetType().ToString() : string.Empty);
                base.AppendLog(logRowFormatter);
                if (base.IsDebugTraceEnabled)
                {
                    string message = string.Format("Assistant: {0}, Server: {1}, Database: {2}, Event: {3}, Exception: {4}", new object[]
                    {
                        assistantName,
                        this.ServerName,
                        databaseName ?? string.Empty,
                        eventType,
                        (exception != null) ? exception.Message : string.Empty
                    });
                    base.SafeTraceDebug((long)this.GetHashCode(), message, new object[0]);
                }
            }
Esempio n. 11
0
 // Token: 0x060009DE RID: 2526 RVA: 0x0002C638 File Offset: 0x0002A838
 private void AppendLogRow(LogRowFormatter row)
 {
     if (!base.IsDisposed)
     {
         this.log.Append(row, 0);
     }
 }
Esempio n. 12
0
        public static void LogException(RmsClientManagerLog.RmsClientManagerFeature clientManagerFeature, RmsClientManagerContext context, Exception ex)
        {
            if (!RmsClientManagerLog.rmsLogEnabled)
            {
                return;
            }
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            StringBuilder stringBuilder = null;

            if (ex != null)
            {
                stringBuilder = new StringBuilder(ex.Message.Length + ex.GetType().Name.Length + 3);
                stringBuilder.AppendFormat("{0} [{1}]", ex.Message, ex.GetType().Name);
                if (ex.InnerException != null)
                {
                    stringBuilder.AppendFormat("; Inner Exception: {0} [{1}]", ex.InnerException.Message, ex.InnerException.GetType().Name);
                }
            }
            LogRowFormatter logRowFormatter = new LogRowFormatter(RmsClientManagerLog.rmsLogSchema);

            logRowFormatter[1] = clientManagerFeature;
            logRowFormatter[2] = RmsClientManagerLog.RmsClientManagerEvent.Exception;
            Guid transactionId = context.TransactionId;

            logRowFormatter[7] = context.TransactionId.ToString();
            logRowFormatter[6] = context.ContextStringForm;
            if (stringBuilder != null)
            {
                logRowFormatter[5] = stringBuilder.ToString();
            }
            RmsClientManagerLog.Append(logRowFormatter);
        }
Esempio n. 13
0
        public static void LogCommon(ServiceLogger.LogLevel logLevel, string message, string customData, ServiceLogger.Component componentName = ServiceLogger.Component.None, string logFileType = "", string logFilePath = "")
        {
            if (ServiceLogger.serviceLog == null)
            {
                ServiceLogger.InitializeMtrtLog();
            }
            if (ServiceLogger.ServiceLogLevel == ServiceLogger.LogLevel.None || logLevel < ServiceLogger.ServiceLogLevel)
            {
                return;
            }
            LogRowFormatter logRowFormatter = new LogRowFormatter(ServiceLogger.MessageTracingServiceLogSchema);

            logRowFormatter[1] = logLevel.ToString();
            if (!string.IsNullOrEmpty(logFileType))
            {
                string[] array = logFileType.Split(new char[]
                {
                    '_'
                });
                logRowFormatter[2] = array[0];
            }
            if (!string.IsNullOrEmpty(logFilePath))
            {
                logRowFormatter[3] = logFilePath;
            }
            logRowFormatter[4] = componentName.ToString();
            logRowFormatter[5] = message;
            if (!string.IsNullOrEmpty(customData))
            {
                logRowFormatter[6] = customData;
            }
            ServiceLogger.serviceLog.Append(logRowFormatter, 0);
        }
Esempio n. 14
0
 internal void Append(string callerFilePath, string memberName, int callerFileLine)
 {
     if (!this.initialized)
     {
         lock (this.logLock)
         {
             if (!this.initialized)
             {
                 this.Initialize(ExDateTime.UtcNow, Path.Combine(ServiceTopologyLog.GetExchangeInstallPath(), "Logging\\ServiceTopology\\"), ServiceTopologyLog.DefaultMaxRetentionPeriod, ServiceTopologyLog.DefaultDirectorySizeQuota, ServiceTopologyLog.DefaultPerFileSizeQuota, true);
             }
         }
     }
     if (this.enabled)
     {
         LogRowFormatter logRowFormatter = new LogRowFormatter(ServiceTopologyLog.Schema);
         logRowFormatter[1] = this.GetNextSequenceNumber();
         logRowFormatter[2] = Globals.ProcessName;
         logRowFormatter[3] = Globals.ProcessId;
         logRowFormatter[4] = string.Format("{0}: Method {1}: Line {2}", callerFilePath, memberName, callerFileLine);
         lock (this.logLock)
         {
             this.rows.Add(logRowFormatter);
             if (this.flush == null)
             {
                 this.flush = new ServiceTopologyLog.FlushDelegate(this.FlushRows);
                 this.flush.BeginInvoke(null, null);
             }
         }
     }
 }
Esempio n. 15
0
 private IEnumerable GetRowFormatterEnumerator(LogRowFormatter rowFormatter)
 {
     for (int i = 0; i < this.logSchema.Fields.Length; i++)
     {
         yield return(rowFormatter[i]);
     }
     yield break;
 }
Esempio n. 16
0
        // Token: 0x06000002 RID: 2 RVA: 0x000020F8 File Offset: 0x000002F8
        public void LogEvent(HealthMonitoringEvents eventId, params KeyValuePair <string, object>[] eventData)
        {
            LogRowFormatter logRowFormatter = new LogRowFormatter(HealthMonitoringLog.healthMonitoringSchema);

            logRowFormatter[1] = HealthMonitoringEventsStrings.StringMap[eventId];
            logRowFormatter[2] = eventData;
            this.logger.Append(logRowFormatter, 0);
        }
 // Token: 0x060001AD RID: 429 RVA: 0x000070D8 File Offset: 0x000052D8
 protected void AppendLog(LogRowFormatter row)
 {
     this.Log.Append(row, this.TimestampField);
     this.SafeTraceDebug(0L, "Row is appended for {0}.", new object[]
     {
         this.LogTypeName
     });
 }
Esempio n. 18
0
        public new void LogEvent(LogEventType eventType, string data)
        {
            LogRowFormatter logRowFormatter = base.LogEvent(eventType, data, FolderTaskLoggerBase.LogType.Folder);

            if (this.gZipLoggingStream != null)
            {
                logRowFormatter.Write(this.gZipLoggingStream);
            }
        }
Esempio n. 19
0
        private void WriteLine(string entryType, string format, params object[] args)
        {
            LogRowFormatter logRowFormatter = new LogRowFormatter(this.logSchema);

            logRowFormatter[1] = entryType;
            logRowFormatter[2] = Thread.CurrentThread.ManagedThreadId;
            logRowFormatter[3] = CommonUtils.FoldIntoSingleLine(string.Format(format, args));
            this.exlog.Append(logRowFormatter, 0);
        }
        public new void LogEvent(LogEventType eventType, string data)
        {
            LogRowFormatter logRowFormatter = null;

            base.LogEvent(eventType, data, out logRowFormatter);
            if (this.gZipLoggingStream != null)
            {
                logRowFormatter.Write(this.gZipLoggingStream);
            }
        }
Esempio n. 21
0
        public static void LogSignal(OfficeGraphSignalType signalType, string signal, string organizationId, string sharePointUrl)
        {
            LogRowFormatter logRowFormatter = new LogRowFormatter(OfficeGraphLog.officeGraphLogSchema);

            logRowFormatter[1] = signalType.ToString();
            logRowFormatter[2] = signal;
            logRowFormatter[3] = organizationId;
            logRowFormatter[4] = sharePointUrl;
            OfficeGraphLog.Append(logRowFormatter);
        }
Esempio n. 22
0
        public void WriteLogData(byte[][] logData)
        {
            LogRowFormatter logRowFormatter = new LogRowFormatter(this.logSchemaMapping, true, false);

            for (int i = 0; i < logData.GetLength(0); i++)
            {
                logRowFormatter[i] = logData[i];
            }
            this.log.Append(logRowFormatter, -1);
        }
Esempio n. 23
0
        public EdgeSyncLogSession OpenSession(string sessionId, string remoteServerFqdn, int remotePort, string localServerFqdn, EdgeSyncLoggingLevel loggingLevel)
        {
            LogRowFormatter logRowFormatter = new LogRowFormatter(this.schema);

            logRowFormatter[1] = sessionId;
            logRowFormatter[4] = remoteServerFqdn;
            logRowFormatter[5] = remotePort;
            logRowFormatter[3] = localServerFqdn;
            return(new EdgeSyncLogSession(this, logRowFormatter, loggingLevel));
        }
 public override string ToString()
 {
     if (this.toStringValue == null)
     {
         bool   flag;
         string text = LogRowFormatter.FormatCollection(this.GetEventData(), true, out flag);
         this.toStringValue = string.Format("{0},{1}", this.clientTimestamp, flag ? ClientWatsonDatapointHandler.ClientWatsonReportLogEvent.GetCsvEscapedString(text) : text);
     }
     return(this.toStringValue);
 }
 // Token: 0x0600003F RID: 63 RVA: 0x00003410 File Offset: 0x00001610
 private static void PopulateRequestParmeters <T>(LogRowFormatter row, ObtainTokensRequest <T> request)
 {
     row[2] = request.ClientHostName;
     row[4] = request.ClientProcessName;
     row[3] = request.ClientType;
     row[5] = request.MailboxGuid;
     row[6] = request.RequestedAction;
     row[8] = request.RequestedTokenCount;
     row[7] = request.TotalTokenCount;
 }
Esempio n. 26
0
        public string GetProperty(Enum property)
        {
            object propertyObject = this.GetPropertyObject(property);

            if (propertyObject == null)
            {
                return(null);
            }
            return(LogRowFormatter.Format(propertyObject));
        }
        public static void Log(string source, object detail)
        {
            LogRowFormatter logRowFormatter = new LogRowFormatter(InferenceDiagnosticsLog.Schema);

            logRowFormatter[0] = DateTime.UtcNow;
            logRowFormatter[1] = InferenceDiagnosticsLog.ProcessName;
            logRowFormatter[2] = source;
            logRowFormatter[3] = detail;
            InferenceDiagnosticsLog.Logger.Append(logRowFormatter, -1);
        }
Esempio n. 28
0
        private static void LogEvent(RmsClientManagerLog.RmsClientManagerFeature clientManagerFeature, RmsClientManagerLog.RmsClientManagerEvent clientManagerEvent, Guid transaction, string data, string context)
        {
            LogRowFormatter logRowFormatter = new LogRowFormatter(RmsClientManagerLog.rmsLogSchema);

            logRowFormatter[1] = clientManagerFeature;
            logRowFormatter[2] = clientManagerEvent;
            logRowFormatter[7] = transaction.ToString();
            logRowFormatter[6] = context;
            logRowFormatter[5] = data;
            RmsClientManagerLog.Append(logRowFormatter);
        }
 private void Append(LogRowFormatter row)
 {
     try
     {
         this.asyncLog.Append(row, 0);
     }
     catch (ObjectDisposedException)
     {
         ExTraceGlobals.StoreDriverDeliveryTracer.TraceDebug(0L, "Appending to Delivery Throttling log failed with ObjectDisposedException");
     }
 }
 public override string ToString()
 {
     if (this.recalculateStringValue)
     {
         bool   flag;
         string text = LogRowFormatter.FormatCollection(this.GetEventData(), true, out flag);
         this.stringValue            = string.Format("S:EventId:{0};{1}", this.EventId, flag ? SchemaBasedLogEvent <T> .GetCsvEscapedString(text) : text);
         this.recalculateStringValue = false;
     }
     return(this.stringValue);
 }