log_setup.py¶
This module is used to set up and manipulate the logging
configuration for
utilities like debug mode.
Functionality overview¶
By way of hutch_python.ipython_log.IPythonLogger
, log the following
to {{LOG_DIR}}/year_month/user_timestamp.log
:
All IPython input
Any DEBUG message (well, _level 5+_) - Exception: hushed loggers, listed below - Exception: Only whitelisted ophyd object logs, down to DEBUG level (or 5)
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 |