I'm trying to implement something like Django's yellow exception HTML page, where it has the stacktrace, local and global variables. And I want to log that info to a file on production where DEBUG=False
.
I tried a custom middleware and only managed to log the stacktrace and the global variables, but most importantly I need to log the local variables of the views function or view class