keep a log of something
552781
function log(obj, message) {
		obj = obj || [];
		obj.push({
			time: new Date(),
			log: message
		});
		
		return obj;
	}
1002366
def log(logger, level, message):
    """"""

    if logger.parent.name != 'root':
        logger.log(level, message)
    else:
        print(message, file=sys.stderr)
93716
function log(conn, name, message) {
    if (! show_sql) {
        return;
    }
    function padding(n, len) {
        var
            s = n.toString(),
            p = len - s.length;
        while (p > 0) {
            s = '0' + s;
            p--;
        }
        return s;
    }
    var
        d = new Date(),
        h = d.getHours(),
        m = d.getMinutes(),
        s = d.getSeconds(),
        ms = d.getMilliseconds(),
        date = padding(h, 2) + ':' + padding(m, 2) + ':' + padding(s, 2) + '.' + padding(ms, 3);
    console.log(date + (conn ? (' [Warp@' + conn.__objectId + '] ') : ' ') + name + ': ' + message);
}
741280
function log(msg, color) {
        if (typeof(msg) === 'object') {
            for (var item in msg) {
                if (msg.hasOwnProperty(item)) {
                    if(color && color in $.util.colors) {
                        $.util.log($.util.colors[color](msg[item]));
                    }
                    $.util.log($.util.colors.lightgreen(msg[item]));
                }
            }
        } else {
            $.util.log($.util.colors.green(msg));
        }
    }
364568
def touch_log(log, cwd='.'):
  
  logfile = '%s/%s' % (cwd, log)
  with open(logfile, 'a'):
    os.utime(logfile, None)
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)
1134009
function writeLog(level, msg) {
  var line;
  if(showSourceInfo) {
    var si = getSourceInfo();
    if (includeDate) {
      line = util.format("[%s] <%s>\t[%s:%s] %s", moment().format(), level, si.file, si.lineNumber, msg);
    } else {
      line = util.format("<%s>\t[%s:%s] %s", level, si.file, si.lineNumber, msg);
    }
  } else {
    if (includeDate) {
      line = util.format("[%s] <%s>\t%s", moment().format(), level, msg);
    } else {
      line = util.format("<%s>\t%s", level, msg);
    }
  }

  line += '\n';
  appenders.forEach(function(appender) {
    appender(level, line);
  });
}
353388
function log() {
	var msg = util.format.apply(null, Array.prototype.slice.call(arguments, 0));
	write(msg);
}
645339
def printlog(self, string, verbose=None, flush=False):
        """"""
        if self.writelog:
            self.logger.info(string)
        if verbose or (self.verbose and verbose is None):
            print(string, flush=flush)
307152
public synchronized void backupTrxLog(Object objMessage)
    {
        try {
            this.getWriter().writeObject(objMessage);
            m_lastWrite = System.currentTimeMillis();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
437010
function log(type, args, color){
  pad();
  var msg = format.apply(format, args);
  if (color) msg = chalk[color](msg);
  var pre = prefix();
  console[type](pre, msg);
}
75087
def log_all(self, file):
        """"""
        global rflink_log
        if file == None:
            rflink_log = None
        else:
            log.debug('logging to: %s', file)
            rflink_log = open(file, 'a')
47502
public void log(Log log) {
    log.info("Counters: " + size());
    for(Group group: this) {
      log.info("  " + group.getDisplayName());
      for (Counter counter: group) {
        log.info("    " + counter.getDisplayName() + "=" + 
                 counter.getCounter());
      }   
    }
  }
171819
def _log_to_file(self, etype, source, msg='', target='', hostmask='', params=''):
        
        today = datetime.utcnow()
        # TODO: Use self.locale['timezone'] for changing time
        date = today.strftime(self.locale['date_fmt'])
        time = today.strftime(self.locale['time_fmt'])
        datetime_s = today.strftime(self.locale['short_datetime_fmt'])
        datetime_l = today.strftime(self.locale['long_datetime_fmt'])
        
        if target == self.nickname and etype in ('privmsg', 'action'):
            target = source

        if etype in self.log_formats:
            file_path = os.path.expanduser(self.log_file.format(**locals()))
            file_dir = os.path.dirname(file_path)
            if not os.path.isdir(file_dir):
                os.makedirs(file_dir)

            line = self.log_formats[etype].format(**locals())
            with open(file_path, 'a') as log:
                log.write(line+'\n')
675273
def _log_control(self, s):
        """"""
        if self.encoding is not None:
            s = s.decode(self.encoding, 'replace')
        self._log(s, 'send')
142189
def get_log(self, offset, count=10, callback=None):
        '''
        
        '''
        params = {'offset': offset, 'count': count}
        return self.execute_command('getLog', params, callback=callback)
392796
function writeLog(msgs){
    var data = (msgs.length === 1) ? msgs[0] : msgs;
    
    this.config.callback(data);
}