Changeset e4335ae in sasview for src/sas/logger_config.py


Ignore:
Timestamp:
Jul 19, 2018 4:12:03 AM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
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:
c0de493
Parents:
02e7d3a
git-author:
Torin Cooper-Bennun <40573959+tcbennun@…> (07/19/18 04:12:03)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (07/19/18 04:12:03)
Message:

SASVIEW-957 logging changes (#158)

  • rework XStream to continue to write to stdout/stderr alongside redirection; make logging level setting consistent; make log configuration more consistent
  • rm XStream; QT signal in QtHandler? logging handler; only logs in Log Explorer (no stdout/stderr)
  • no need to change handler level
  • use QTextBrowser.append to facilitate auto-scrolling in the Log Explorer
  • modify logger unit test to reflect changes (passes)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/logger_config.py

    rcee5c78 re4335ae  
    77 
    88import pkg_resources 
    9  
    109 
    1110''' 
     
    2928            logging.captureWarnings(True) 
    3029            logger = logging.getLogger(self.name) 
     30 
    3131        return logger 
    3232 
     
    3838        self._update_all_logs_to_debug(logger) 
    3939        logging.captureWarnings(True) 
     40 
    4041        return logger 
    4142 
     
    4950        ''' 
    5051        for handler in logger.handlers or logger.parent.handlers: 
    51             #handler.setLevel(logging.DEBUG) 
    52             handler.setLevel(logging.WARNING) 
     52            handler.setLevel(logging.DEBUG) 
    5353        for name, _ in logging.Logger.manager.loggerDict.items(): 
    54             #logging.getLogger(name).setLevel(logging.DEBUG) 
    55             logging.getLogger(name).setLevel(logging.WARNING) 
     54            logging.getLogger(name).setLevel(logging.DEBUG) 
    5655 
    5756    def _find_config_file(self, filename="logging.ini"): 
Note: See TracChangeset for help on using the changeset viewer.