You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering about the idea of inserting the log messages into a particular document in a given collection.
In terms of design I see a downfall, it requires explicitly the document id. For instance via dependency injection, but I'm failing to see to do this in a transparent way (disable / enable handler under demand, without modifying the rest of the logging calls)
Kind regards
The text was updated successfully, but these errors were encountered:
You'll probably have to write your own class that inherits from the main logger class to implement this.
In this class you'll have to change write_method to update_one and pass this pass a custom formatter which does not create a new document every time it is invoked.
If you really need this feature you can contact me privately. I am currently busy with higher prio projects.
@LavinJ , if you are already inserting a specific Document, you could also overwrite the _id. MongoDB allows that. I outlined more or less how you should do it your feature in my previous comment. As for a policy:
keep your code pep-8 compatible, and make sure you submit tested code - e.g. with tests. If you do this, I see no reason, as long as your code does not break other things, why your PR should no be accepted.
Hi
I was wondering about the idea of inserting the log messages into a particular document in a given collection.
In terms of design I see a downfall, it requires explicitly the document id. For instance via dependency injection, but I'm failing to see to do this in a transparent way (disable / enable handler under demand, without modifying the rest of the logging calls)
Kind regards
The text was updated successfully, but these errors were encountered: