Created
March 4, 2018 12:15
-
-
Save wiredfool/3e8aedea816d52376221b5ee0dd16285 to your computer and use it in GitHub Desktop.
For figuring out where stuff is called when deep in web frameworks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect; | |
stack = "".join("""%s:%s %s\n%s""" %(f.filename, f.lineno, f.function, f.code_context[0]) | |
for f in inspect.stack()[1:10]) | |
logger.debug(stack) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment