protected override void Append(LoggingEvent[] loggingEvents) { var factory = new BuildBsonDocumentFactory(_fields); IBuildBsonDocument buildBsonDocument = factory.GetBuildBsonDocument(); var collection = GetCollection(); collection.InsertManyAsync(loggingEvents.Select(t => buildBsonDocument.Build(t))); }
protected override void Append(LoggingEvent loggingEvent) { var factory = new BuildBsonDocumentFactory(_fields); IBuildBsonDocument buildBsonDocument = factory.GetBuildBsonDocument(); var document = buildBsonDocument.Build(loggingEvent); var collection = GetCollection(); collection.InsertOne(document); }