Ejemplo n.º 1
0
    def warning(self, msg):
        """
        """

        if self.logger is not None:
            if globalv.use_warning_display:
                from pychron.displays.gdisplays import gWarningDisplay

                if globalv.show_warnings:
                    gWarningDisplay.add_text(
                        '{{:<{}s}} -- {{}}'.format(NAME_WIDTH).format(self.logger.name.strip(), msg))

            self._log_('warning', msg)
Ejemplo n.º 2
0
    def warning(self, msg):
        """
        """

        if self.logger is not None:
            if globalv.use_warning_display:
                from pychron.displays.gdisplays import gWarningDisplay

                if globalv.show_warnings:
                    gWarningDisplay.add_text(
                        '{{:<{}s}} -- {{}}'.format(NAME_WIDTH).format(
                            self.logger.name.strip(), msg))

            self._log_('warning', msg)
Ejemplo n.º 3
0
    def warning(self, msg, decorate=True):
        """
        """

        if self.logger is not None:
            if self.use_warning_display:
                from pychron.displays.gdisplays import gWarningDisplay

                if globalv.show_warnings:
                #if not gWarningDisplay.opened and not gWarningDisplay.was_closed:
                #invoke_in_main_thread(gWarningDisplay.edit_traits)
                #gWarningDisplay.opened = True
                    gWarningDisplay.add_text(
                        '{{:<{}s}} -- {{}}'.format(NAME_WIDTH).format(self.logger.name.strip(), msg))

            # if decorate:
            #     msg = '****** {}'.format(msg)
            self._log_('warning', msg)
Ejemplo n.º 4
0
    def warning(self, msg, decorate=True):
        """
        """

        if self.logger is not None:
            if self.use_warning_display:
                from pychron.displays.gdisplays import gWarningDisplay

                if globalv.show_warnings:
                    #if not gWarningDisplay.opened and not gWarningDisplay.was_closed:
                    #invoke_in_main_thread(gWarningDisplay.edit_traits)
                    #gWarningDisplay.opened = True
                    gWarningDisplay.add_text(
                        '{{:<{}s}} -- {{}}'.format(NAME_WIDTH).format(
                            self.logger.name.strip(), msg))

            # if decorate:
            #     msg = '****** {}'.format(msg)
            self._log_('warning', msg)