Changeset 799963c in sasview for src/sas/logger_config.py
- Timestamp:
- Aug 13, 2018 11:13:27 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 328f2ef
- Parents:
- ecfe6b6
- git-author:
- Torin Cooper-Bennun <torin.cooper-bennun@…> (08/13/18 11:12:53)
- git-committer:
- Torin Cooper-Bennun <torin.cooper-bennun@…> (08/13/18 11:13:27)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/logger_config.py
re4335ae r799963c 7 7 8 8 import pkg_resources 9 10 from sas import get_custom_config 9 11 10 12 ''' … … 39 41 logging.captureWarnings(True) 40 42 43 self._disable_debug_from_config() 44 41 45 return logger 46 47 def _disable_debug_from_config(self): 48 '''disable DEBUG logs as per user configuration (DEBUG logs disabled by default)''' 49 disable_debug = True 50 custom_config = get_custom_config() 51 52 if hasattr(custom_config, "FILTER_DEBUG_LOGS"): 53 if type(custom_config.FILTER_DEBUG_LOGS) is bool: 54 disable_debug = custom_config.FILTER_DEBUG_LOGS 55 else: 56 logging.warning("FILTER_DEBUG_LOGS has invalid value in custom_config.py") 57 58 if disable_debug: 59 # logging.info("Note: DEBUG logs are disabled.") 60 logging.disable(logging.DEBUG) 42 61 43 62 def _read_config_file(self):
Note: See TracChangeset
for help on using the changeset viewer.