Changeset c155a16 in sasview for src/sas/sasgui/plottools


Ignore:
Timestamp:
Apr 4, 2017 10:06:27 AM (8 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/plottools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/PlotPanel.py

    r198fa76 rc155a16  
    3333from sas.sasgui.guiframe.events import StatusEvent 
    3434from .toolbar import NavigationToolBar, PlotPrintout, bind 
     35 
     36logger = logging.getLogger() 
    3537 
    3638def show_tree(obj, d=0): 
     
    15061508                    from mpl_toolkits.mplot3d import Axes3D 
    15071509                except: 
    1508                     logging.error("PlotPanel could not import Axes3D") 
     1510                    logger.error("PlotPanel could not import Axes3D") 
    15091511                self.subplot.figure.clear() 
    15101512                ax = Axes3D(self.subplot.figure) 
  • src/sas/sasgui/plottools/binder.py

    rd7bb526 rc155a16  
    44import sys 
    55import logging 
     6 
     7logger = logging.getLogger() 
    68 
    79class Selection(object): 
     
    121123            for cid in self._connections: self.canvas.mpl_disconnect(cid) 
    122124        except: 
    123             logging.error("Error disconnection canvas: %s" % sys.exc_value) 
     125            logger.error("Error disconnection canvas: %s" % sys.exc_value) 
    124126        self._connections = [] 
    125127 
  • src/sas/sasgui/plottools/canvas.py

    rd7bb526 rc155a16  
    1111from matplotlib.backends.backend_wx import RendererWx 
    1212 
     13logger = logging.getLogger() 
     14 
    1315 
    1416def draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None): 
     
    9698            dc.DrawBitmap(self.canvas.bitmap, (0, 0)) 
    9799        except: 
    98             logging.error(sys.exc_value) 
     100            logger.error(sys.exc_value) 
    99101 
    100102    # restore original figure  resolution 
     
    207209                fig.draw(self) 
    208210            except ValueError: 
    209                 logging.error(sys.exc_value) 
     211                logger.error(sys.exc_value) 
    210212        else: 
    211213            self._isRendered = False 
  • src/sas/sasgui/plottools/plottables.py

    ra9f579c rc155a16  
    4646import sys 
    4747import logging 
     48 
     49logger = logging.getLogger() 
    4850 
    4951if 'any' not in dir(__builtins__): 
     
    808810                        tempdy.append(self.dy[i]) 
    809811                except: 
    810                     logging.error("check_data_logX: skipping point x %g", self.x[i]) 
    811                     logging.error(sys.exc_value) 
     812                    logger.error("check_data_logX: skipping point x %g", self.x[i]) 
     813                    logger.error(sys.exc_value) 
    812814            self.x = tempx 
    813815            self.y = tempy 
     
    838840                        tempdy.append(self.dy[i]) 
    839841                except: 
    840                     logging.error("check_data_logY: skipping point %g", self.y[i]) 
    841                     logging.error(sys.exc_value) 
     842                    logger.error("check_data_logY: skipping point %g", self.y[i]) 
     843                    logger.error(sys.exc_value) 
    842844 
    843845            self.x = tempx 
  • src/sas/sasgui/plottools/toolbar.py

    rd7bb526 rc155a16  
    66from matplotlib.backends.backend_wx import _load_bitmap 
    77import logging 
     8 
     9logger = logging.getLogger() 
    810 
    911# Event binding code changed after version 2.5 
     
    9496            self._parent.onToolContextMenu(event=event) 
    9597        except: 
    96             logging.error("Plot toolbar could not show menu") 
     98            logger.error("Plot toolbar could not show menu") 
    9799 
    98100    def context_menu(self, event): 
     
    122124        except: 
    123125            import traceback 
    124             logging.error(traceback.format_exc()) 
     126            logger.error(traceback.format_exc()) 
    125127 
    126128    def copy_figure(self, event): 
Note: See TracChangeset for help on using the changeset viewer.