Closed dmsquires closed 8 years ago
Yes, you are correct. The API for python says the following:
expireAfterSeconds:
Used to create an expiring (TTL) collection. MongoDB will automatically delete documents from this collection after seconds. The indexed field must be a UTC datetime or the data will not expire.
Setting up a TTL on log4mongo-python logs does not work on type Timestamp (which is what is logged by default in log4mongo-python). 10gen recommends Timestamp type is not used externally. Type Date is used for TTL:
https://docs.mongodb.com/manual/reference/bson-types/
Note
https://docs.mongodb.com/manual/tutorial/expire-data/