NLog.Mongo
NLog.Mongo copied to clipboard
Added support for suffix on database and/or collection
Summary
This PR introduces the ability to add dynamic suffixes to MongoDB database name and/or collection names in the NLog.Mongo target, enabling more flexible log organization and partitioning strategies (ex. multi tenants)
Changes Made
- Added
databaseSuffixPropertyandcollectionSuffixPropertytoMongoTargetto identify which bson property needs to be read to get the suffix. - Updated the collection and database's resolution based on the properties above
- Updated tests to validate suffix functionality and to show how to configure the property
Fully backward compatible