Code snippets and recipes for loguru — loguru documentation
Firstly, if you use pickle to load log messages (e.g. from the network), make sure the source is trustable or sign the data to verify its authenticity before deserializing it. If you do not take these precautions, malicious code could be executed by an attacker. You can read more details in this article: What’s so dangerous about pickles?
https://loguru.readthedocs.io/en/stable/resources/recipes.html