Log python system warnings.
779662
def capture_pywarnings(handler):
        """"""
        logger = logging.getLogger('py.warnings')
        # Check for previously installed handlers.
        for h in logger.handlers:
            if isinstance(h, handler.__class__):
                return
        logger.addHandler(handler)
        logger.setLevel(logging.WARNING)
100576
def warning(self, msg, *args, **kwargs):
        """"""
        self._log("WARNING", msg, args, kwargs)
609095
def warn(self, msg, *args, **kwargs):
    """"""
    if six.PY3:
      warnings.warn("The 'warn' method is deprecated, use 'warning' instead",
                    DeprecationWarning, 2)
    self.log(logging.WARN, msg, *args, **kwargs)
1169994
def warning(self, message, *args, **kwargs):
        """"""
        self.log("warn", message, *args, **kwargs)
870464
def log(self) :
		""""""
		
		self.logs['epochDuration'].append(self.lastEpochDuration)
		self.logs['avg'].append(self.avg)
		self.logs['runtime'].append(self.runtime)
		self.logs['remtime'].append(self.remtime)
644466
def warn(warn_string, log=None):
    

    if import_fail:
        warn_txt = 'WARNING'
    else:
        warn_txt = colored('WARNING', 'yellow')

    # Print warning to stdout.
    sys.stderr.write(warn_txt + ': ' + warn_string + '\n')

    # Check if a logging structure is provided.
    if not isinstance(log, type(None)):
        warnings.warn(warn_string)
1247053
def do_log(self, line):
        """"""
        path = self._split_args(line, 0, 1, pad=False)
        if len(path):
            path = path[0]
        self._command_processor.log(path)
760191
def log(message, type):
    """"""

    (sys.stdout if type == 'notice' else sys.stderr).write(message + "\n")
1100992
def warn(self,message):
        
        s = str(datetime.now()) + " WARNING: " + message + '\n'
        if self.echo:
            print(s,end='')
        if self.filename:
            self.f.write(s)
            self.f.flush
        warnings.warn(s,PyemuWarning)
835124
def warning(self_, msg,*args,**kw):
        
        if not warnings_as_exceptions:
            global warning_count
            warning_count+=1
            self_.__db_print(WARNING,msg,*args,**kw)
        else:
            raise Exception("Warning: " + msg % args)
1088790
def syslog(self, *args):
        '''
        

        '''
        if len(args):
            self._b_syslog = args[0]
        else:
            return self._b_syslog
1310464
def warning(self, s):
        
        print("   WARNING: '%s', %s" % (self.src_id, s), file=sys.stderr)
137155
def system(*args, **kwargs):
    """"""
    kwargs.setdefault('stdout', subprocess.PIPE)
    proc = subprocess.Popen(args, **kwargs)
    out, _ = proc.communicate()
    if proc.returncode:
        raise SystemExit(proc.returncode)
    return out.decode('utf-8')
172197
def display_warning(self):
        """"""
        if self.warn:
            warnings.warn(
                "\nProperty '{}' is deprecated and may be removed in the "
                "future. Please use '{}'.".format(self.name, self.new_name),
                FutureWarning, stacklevel=3
            )
648739
def str_syslog(self, *args):
        '''
        

        '''
        if len(args):
            self._str_syslog = args[0]
        else:
            return self._str_syslog
1327474
def log_warning(self, msg):
        
        if self.__logger:
            self.__logger.warning(msg)

        if self.__raise_exception_on_warning:
            raise RuntimeError(msg)
1024676
def warning(self, message, *args, **kwargs):
        
        self.system.warning(message, *args, **kwargs)