Changeset 799963c in sasview
- 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)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
run.py
rdb05c44 r799963c 155 155 # so logging can be done during initialization process too 156 156 root = abspath(dirname(realpath(sys.argv[0]))) 157 addpath(joinpath(root, 'src','sas')) 158 from logger_config import SetupLogger 157 158 addpath(joinpath(root, 'src')) 159 addpath(joinpath(root, '../sasmodels/')) # dependency (for loading custom_config.py during log setup) 160 161 from sas.logger_config import SetupLogger 159 162 logger = SetupLogger(__name__).config_development() 160 163 -
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): -
src/sas/sasview/custom_config.py
r914ba0a r799963c 16 16 DEFAULT_PERSPECTIVE = "Fitting" 17 17 SAS_OPENCL = "None" 18 19 # Logging options 20 FILTER_DEBUG_LOGS = True
Note: See TracChangeset
for help on using the changeset viewer.