Configuration¶
Default predicates and action kwargs defaults can be configured via a PYTHONHUNTERCONFIG environment variable.
All the actions kwargs:
klassstreamforce_colorsforce_pidfilename_alignmentthread_alignmentpid_alignmentrepr_limitrepr_func
Example:
PYTHONHUNTERCONFIG="stdlib=False,force_colors=True"
This is the same as PYTHONHUNTER="stdlib=False,action=CallPrinter(force_colors=True)".
Notes:
Setting
PYTHONHUNTERCONFIGalone doesn’t activate hunter.All the options for the builtin actions are supported.
Although using predicates is supported it can be problematic. Example of setup that won’t trace anything:
PYTHONHUNTERCONFIG="Q(module_startswith='django')" PYTHONHUNTER="Q(module_startswith='celery')"
which is the equivalent of:
PYTHONHUNTER="Q(module_startswith='django'),Q(module_startswith='celery')"
which is the equivalent of:
PYTHONHUNTER="Q(module_startswith='django')&Q(module_startswith='celery')"