Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of <see cref="LogEntity"/>
 /// </summary>
 public LogEntity(LogEntity origin)
 {
     Facts     = new LogFacts(origin.Facts);
     Labels    = new LogLabels(origin.Labels);
     Time      = origin.Time;
     Message   = origin.Message;
     Exception = origin.Exception;
 }
Beispiel #2
0
        /// <summary>
        /// Adds log label into exception
        /// </summary>
        public void AddLabel(string labelName, string labelValue)
        {
            LogLabels stringList;

            if (_e.Data.Contains(LabelsKey))
            {
                stringList = (LogLabels)_e.Data[LabelsKey];
            }
            else
            {
                stringList = new LogLabels();
                _e.Data.Add(LabelsKey, stringList);
            }

            if (stringList.ContainsKey(labelName))
            {
                stringList[labelName] = labelValue;
            }
            else
            {
                stringList.Add(labelName, labelValue);
            }
        }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of <see cref="LogEntity"/>
 /// </summary>
 public LogEntity()
 {
     Facts  = new LogFacts();
     Labels = new LogLabels();
 }