log function
        Args:
            msg: the text message to be logged
557052
def log(self, msg):
        

        time = self.get_time()

        msg = "{:s}\t {:s}".format(time, msg)

        self.history.append(msg)
        self.history_model.insertRow(0, QtGui.QStandardItem(msg))
1152185
@Override
    protected void log(final String msg) {
        if (config.getLogLevel().equals(LogLevel.DEBUG)) {
            logger.debug(msg);
        } else if (config.getLogLevel().equals(LogLevel.TRACE)) {
            logger.trace(msg);
        } else if (config.getLogLevel().equals(LogLevel.INFO)) {
            logger.info(msg);
        } else if (config.getLogLevel().equals(LogLevel.WARN)) {
            logger.warn(msg);
        } else if (config.getLogLevel().equals(LogLevel.ERROR)) {
            logger.error(msg);
        }
    }
270903
def dlog(msg, log_path=DEFAULT_LOG_PATH):
  """"""
  with open(log_path, 'a') as f:
    f.write('\n{}@{}: {}'.format(os.getpid(), threading.current_thread().name, msg))
796678
def debug(self, msg=None, *args, **kwargs):
        

        return self._log(logging.DEBUG, msg, args, kwargs)
1038215
def log(type, message)
      case type.to_sym
      when :info
        msg = message
      when :error
        msg = message
      end

      @messages << msg
      puts msg if verbose?
    end
1094530
public function log($msg)
    {
        $agi = $this->getAgi();
        $this->logger->debug($msg);
        $agi->consoleLog($msg);
    }
968552
def log(self, msg, level="info"):
        
        if not self.config.get("log_file"):
            # If level was given as a str then convert to actual level
            level = LOG_LEVELS.get(level, level)
            syslog(level, u"{}".format(msg))
        else:
            # Binary mode so fs encoding setting is not an issue
            with open(self.config["log_file"], "ab") as f:
                log_time = time.strftime("%Y-%m-%d %H:%M:%S")
                # nice formating of data structures using pretty print
                if isinstance(msg, (dict, list, set, tuple)):
                    msg = pformat(msg)
                    # if multiline then start the data output on a fresh line
                    # to aid readability.
                    if "\n" in msg:
                        msg = u"\n" + msg
                out = u"{} {} {}\n".format(log_time, level.upper(), msg)
                try:
                    # Encode unicode strings to bytes
                    f.write(out.encode("utf-8"))
                except (AttributeError, UnicodeDecodeError):
                    # Write any byte strings straight to log
                    f.write(out)
560750
function(msg){
		var logs = document.getElementById("logs");
		logs.innerHTML += Funcs.util.getTimeStamp() + ": " + msg + "\n";
	}
1037085
public void trace(String msg) {
        if (logger.isLoggable(Level.FINEST)) {
            log(SELF, Level.FINEST, msg, null);
        }
    }
163387
def handle_message(self, msg):
        
        self._messages.append({
            'type': msg.category,
            'module': msg.module,
            'obj': msg.obj,
            'line': msg.line,
            'column': msg.column,
            'path': msg.path,
            'symbol': msg.symbol,
            'message': str(msg.msg) or '',
            'message-id': msg.msg_id,
        })
435379
def write(self, msg, level=logging.INFO):
        
        if msg is not None and len(msg.strip()) > 0:
            self.logger.log(level, msg)
1363048
def msg(message, *args, **kwargs):
    """"""
    global log_file
    if log_file is None:
        log_file = sys.stderr
    if long_msg:
        file_name, line = caller_trace()
        file_name, file_type = os.path.splitext(file_name)
        if file_name.endswith('/__init__'):
            file_name = os.path.basename(os.path.dirname(file_name))
        elif file_name.endswith('/__main__'):
            file_name = "(-m) {0}".format(
                os.path.basename(os.path.dirname(file_name)))
        else:
            file_name = os.path.basename(file_name)
        head = '{0}{1} ({2}): '.format(file_name, file_type, line)
    else:
        head = '[SERVER] '
    out = StringIO()
    for line in message.format(*args, **kwargs).split('\n'):
        out.write('{0}{1}\n'.format(head, line))
    out.flush()
    out.seek(0)
    if _msg_stderr:
        sys.stderr.write(out.read())
        sys.stderr.flush()
    else:
        log_file.write(out.read())
        log_file.flush()
    out.close()
206272
public static function log($msg)
    {
        $msg = $msg . "\n";
        if (!self::$daemonize) {
            self::safeEcho($msg);
        }
        file_put_contents((string)self::$logFile, date('Y-m-d H:i:s') . ' ' . 'pid:' . getmypid() . ' ' . $msg, FILE_APPEND | LOCK_EX);
    }
390763
def logGPMsg(self, printMsg=True):
        
        from arcpy import GetMessages

        msgs = GetMessages()
        try:
            self.logMsg(msgs, printMsg)
        except:
            self.logMsg('error getting arcpy message', printMsg)
696294
def log_error(self, msg):
        
        if self.__logger:
            self.__logger.error(msg)

        raise RuntimeError(msg)
375267
def log(self, msg):
        
        self._execActions('log', msg)
        msg = self._execFilters('log', msg)
        self._processMsg('log', msg)
        self._sendMsg('log', msg)
325094
def log(self, msg):
        '''
        '''
        if self.logfile:
            fd = self.logfile.fileno()
        else:
            fd = sys.stdout.fileno()

        os.write(fd, ('%.3f %s\n' % (time.time(), msg)).encode('UTF-8'))