log_setup.py¶
This module is used to set up and manipulate the logging
configuration for
utilities like debug mode.
Goals:
Log to {{LOG_DIR}}/year_month/user_timestamp.log: * All IPython input * Any DEBUG message (well, _level 5+_)
-> Exceptions include hushed loggers below -> Exception: Only whitelisted ophyd object logs, down to DEBUG level (or 5) -> Filter out bluesky super-verbose messages?
Log to both the above file and console: * Any INFO, WARNING, ERROR, CRITICAL messages
console exceptions: * ophydobject INFO should be treated as DEBUG
- Hush entirely - neither the file nor the console should see:
-> ophyd.event_dispatcher -> parso -> pyPDB.dbd.yacc
Sets up the |
|
Get the path to the current debug log file |
|
Helper function to find the console |
|
Helper function to get the console’s log level. |
|
Helper function to set the console’s log level. |
|
Enable, disable, or check if we’re in debug mode. |
|
Context manager for running a block of code in |
|
Wrapper for running a function in |