diff --git a/neurotic/gui/config.py b/neurotic/gui/config.py index f2b1d15..4cb05f1 100644 --- a/neurotic/gui/config.py +++ b/neurotic/gui/config.py @@ -23,6 +23,11 @@ logger = logging.getLogger(__name__) +# raise the threshold for PyAV messages printed to the console from +# warning to critical +logging.getLogger('libav').setLevel(logging.CRITICAL) + + pq.mN = pq.UnitQuantity('millinewton', pq.N/1e3, symbol = 'mN'); # define millinewton diff --git a/neurotic/gui/standalone.py b/neurotic/gui/standalone.py index 28ce437..2888669 100644 --- a/neurotic/gui/standalone.py +++ b/neurotic/gui/standalone.py @@ -313,10 +313,19 @@ def toggle_debug_logging(self, checked): if checked: logger.parent.setLevel(logging.DEBUG) logger.debug('Debug messages enabled') + + # lower the threshold for PyAV messages printed to the console from + # critical to warning + logging.getLogger('libav').setLevel(logging.WARNING) + else: logger.debug('Disabling debug messages') logger.parent.setLevel(default_log_level) + # raise the threshold for PyAV messages printed to the console from + # warning to critical + logging.getLogger('libav').setLevel(logging.CRITICAL) + def view_log_file(self): """ Open the log file in an editor. diff --git a/neurotic/scripts.py b/neurotic/scripts.py index b2eda3f..01f6d0e 100644 --- a/neurotic/scripts.py +++ b/neurotic/scripts.py @@ -65,6 +65,11 @@ def parse_args(argv): if args.debug: logger.parent.setLevel(logging.DEBUG) + + # lower the threshold for PyAV messages printed to the console from + # critical to warning + logging.getLogger('libav').setLevel(logging.WARNING) + if not args.launch_example_notebook: # show only if Jupyter won't be launched, since the setting will # not carry over into the kernel started by Jupyter