BuildBsonDocument() 공개 정적인 메소드

public static BuildBsonDocument ( log4net.Core.LoggingEvent loggingEvent ) : BsonDocument
loggingEvent log4net.Core.LoggingEvent
리턴 BsonDocument
        private BsonDocument BuildBsonDocument(LoggingEvent log)
        {
            if (_fields.Count == 0)
            {
                return(BackwardCompatibility.BuildBsonDocument(log));
            }
            var doc = new BsonDocument();

            foreach (MongoAppenderFileld field in _fields)
            {
                object    value     = field.Layout.Format(log);
                BsonValue bsonValue = BsonValue.Create(value);
                doc.Add(field.Name, bsonValue);
            }
            return(doc);
        }