Beispiel #1
0
 private void WriteEventToDatabase(LogDetails details)
 {
     using (IDocumentSession session = _store.OpenSession(DatabaseName))
     {
         session.Store(details);
         session.SaveChanges();
     }
 }
Beispiel #2
0
 protected override void Write(LogEventInfo logEvent)
 {
     var details = new LogDetails(logEvent);
     try
     {
         WriteEventToDatabase(details);
     }
     catch (Exception ex)
     {
         if (ex.MustBeRethrown())
         {
             throw;
         }
         InternalLogger.Error("Error when writing to database {0}", new object[] {ex});
         throw;
     }
 }
Beispiel #3
0
        private void WriteEvent(LogDetails details)
        {
            MongoCollection <LogDetails> logEventInfos = _database.GetCollection <LogDetails>("logdetails");

            logEventInfos.Insert(details);
        }
Beispiel #4
0
 private void WriteEventToDatabase(LogDetails details)
 {
     WriteEvent(details);
 }