Logging Context Manager

In Python, Loguru provides the @logger.catch decorator/context manager. When added just before a function definition, it logs all errors from that function as well as all nested functions.

Is there a similar lib for Elixir?

Well, there is no such lib, but you can just throw an error, and if it will not be rescued, then it will kill the process and you will receive information about that in your logger output.