Ignore:
Timestamp:
Apr 4, 2017 12:06:27 PM (7 years ago)
Author:
Ricardo Ferraz Leal <ricleal@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
463e7ffc
Parents:
6722fae
Message:

Logging is now logger

Location:
src/sas/sasgui/perspectives/invariant
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/invariant/invariant.py

    rc10d9d6c rc155a16  
    2727from sas.sasgui.guiframe.plugin_base import PluginBase 
    2828 
     29logger = logging.getLogger() 
     30 
    2931class Plugin(PluginBase): 
    3032    """ 
     
    4648 
    4749        # Log startup 
    48         logging.info("Invariant plug-in started") 
     50        logger.info("Invariant plug-in started") 
    4951 
    5052    def get_data(self): 
     
    280282 
    281283        except: 
    282             logging.error("invariant.set_state: %s" % sys.exc_value) 
     284            logger.error("invariant.set_state: %s" % sys.exc_value) 
    283285 
    284286    def on_set_state_helper(self, event=None): 
  • src/sas/sasgui/perspectives/invariant/invariant_panel.py

    r18b7ecb9 rc155a16  
    2424from sas.sasgui.guiframe.panel_base import PanelBase 
    2525from sas.sasgui.guiframe.documentation_window import DocumentationWindow 
     26 
     27logger = logging.getLogger() 
    2628 
    2729# The minimum q-value to be used when extrapolating 
     
    460462                self._manager.plot_theory(name="Low-Q extrapolation") 
    461463            except: 
    462                 logging.error(sys.exc_value) 
     464                logger.error(sys.exc_value) 
    463465 
    464466    def get_high_qstar(self, inv, high_q=False): 
     
    494496                self._manager.plot_theory(name="High-Q extrapolation") 
    495497            except: 
    496                 logging.error(sys.exc_value) 
     498                logger.error(sys.exc_value) 
    497499 
    498500    def get_qstar(self, inv): 
     
    845847            attr.SetValue(value) 
    846848        except: 
    847             logging.error("Invariant state: %s", sys.exc_value) 
     849            logger.error("Invariant state: %s", sys.exc_value) 
    848850 
    849851    def get_bookmark_by_num(self, num=None): 
     
    862864            _, _, current_state, comp_state = self.state.bookmark_list[int(num)] 
    863865        except: 
    864             logging.error(sys.exc_value) 
     866            logger.error(sys.exc_value) 
    865867            raise ValueError, "No such bookmark exists" 
    866868 
     
    957959                    self.state.clone_state() 
    958960        except: 
    959             logging.error(sys.exc_value) 
     961            logger.error(sys.exc_value) 
    960962 
    961963        self._set_undo_flag(True) 
     
    10011003                del self.state.state_list[str(i)] 
    10021004            except: 
    1003                 logging.error(sys.exc_value) 
     1005                logger.error(sys.exc_value) 
    10041006        # Enable the undo button if it was not 
    10051007        self._set_undo_flag(True) 
     
    10661068                del self.state.state_list[str(i)] 
    10671069            except: 
    1068                 logging.error(sys.exc_value) 
     1070                logger.error(sys.exc_value) 
    10691071 
    10701072        # try to add new state of the text changes in the state_list 
     
    10811083            self.state.state_list[str(self.state.state_num)] = self.state.clone_state() 
    10821084        except: 
    1083             logging.error(sys.exc_value) 
     1085            logger.error(sys.exc_value) 
    10841086 
    10851087        self._set_undo_flag(True) 
     
    11031105            self.state.state_list[str(self.state.state_num)] = self.state.clone_state() 
    11041106        except: 
    1105             logging.error(sys.exc_value) 
     1107            logger.error(sys.exc_value) 
    11061108 
    11071109    def _get_input_list(self): 
  • src/sas/sasgui/perspectives/invariant/invariant_state.py

    rdb5294e rc155a16  
    1616from sas.sasgui.guiframe.gui_style import GUIFRAME_ID 
    1717from sas.sasgui.guiframe.dataFitting import Data1D 
     18 
     19logger = logging.getLogger() 
    1820 
    1921INVNODE_NAME = 'invariant' 
     
    381383                    msg = "InvariantSate.fromXML: Could not read" 
    382384                    msg += " timestamp\n %s" % sys.exc_value 
    383                     logging.error(msg) 
     385                    logger.error(msg) 
    384386 
    385387            # Parse bookmarks 
     
    694696            msg = "XML document does not contain invariant" 
    695697            msg += " information.\n %s" % sys.exc_value 
    696             logging.info(msg) 
     698            logger.info(msg) 
    697699        return state 
    698700 
  • src/sas/sasgui/perspectives/invariant/report_dialog.py

    rd85c194 rc155a16  
    2020 
    2121from sas.sasgui.guiframe.report_dialog import BaseReportDialog 
     22 
     23logger = logging.getLogger() 
    2224 
    2325class ReportDialog(BaseReportDialog): 
     
    9294                    except: 
    9395                        # DO not open 
    94                         logging.error("Could not open file: %s" % sys.exc_value) 
     96                        logger.error("Could not open file: %s" % sys.exc_value) 
    9597            # delete image file 
    9698            os.remove(pic_fname) 
Note: See TracChangeset for help on using the changeset viewer.