Open JensWinkler91 opened 8 months ago
It would be very useful if we could log changes during up and down.
@JensWinkler91 what kind of logs are we talking about? Could you give an example.
I modify documents in multiple collections.
//Modify collection 1
db.db.collection('collection1').updateMany({}, {
$set: {
param1: "param1Value"
}
});
//Modify collection 2
db.db.collection('collection2').updateMany({}, {
$set: {
param2: "param2Value"
}
});
I get no information what happened if the update for collection 1 failed. To solve that, you could provide a logger that can be used to track the changes during up/down.
//Modify collection 1
Logger.info("Update collection 1");
db.db.collection('collection1').updateMany({}, {
$set: {
param1: "param1Value"
}
});
//Modify collection 2
Logger.info("Update collection 2");
db.db.collection('collection2').updateMany({}, {
$set: {
param2: "param2Value"
}
});
It would be very useful if we could log changes during up and down.