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 fact into exception
        /// </summary>
        public void AddFact(string factName, object factValue)
        {
            LogFacts exceptionFacts;

            if (_e.Data.Contains(FactsKey))
            {
                exceptionFacts = (LogFacts)_e.Data[FactsKey];
            }
            else
            {
                exceptionFacts = new LogFacts();
                _e.Data.Add(FactsKey, exceptionFacts);
            }

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