Write some text to the pusher.

        Args:
            message: a string to push for this file.
            cur_time: used for unit testing. override line timestamp.
436881
def write(self, message, cur_time=None):
        
        if cur_time is None:
            cur_time = time.time()
        lines = self._line_buffer.add_string(message)
        for line in lines:
            #print('ts line', repr(line))
            timestamp = ''
            if self._prepend_timestamp:
                timestamp = datetime.datetime.utcfromtimestamp(
                    cur_time).isoformat() + ' '
            line = u'{}{}{}'.format(self._line_prepend, timestamp, line)
            self._fsapi.push(self._filename, line)
927522
def write(self, *messages):
        
        for message in messages:
            if not isinstance(message, Token):
                message = ensure_tuple(message, cls=self._input_type, length=self._input_length)
                if self._input_length is None:
                    self._input_length = len(message)
            self.input.put(message)
938638
def _log(self, message):
        
        self._logger.debug("{}: {}".format(self.name, message))
102502
def _buffer(self, event: Message):
        
        if isinstance(event, BytesMessage):
            self._byte_buffer.write(event.data)
        elif isinstance(event, TextMessage):
            self._string_buffer.write(event.data)
423494
def _send(self, message, fail_silently=False):
        
        seeds = '1234567890qwertyuiopasdfghjklzxcvbnm'
        file_part1 = datetime.now().strftime('%Y%m%d%H%M%S')
        file_part2 = ''.join(sample(seeds, 4))
        filename = join(self.tld, '%s_%s.msg' % (file_part1, file_part2))
        with open(filename, 'w') as fd:
            fd.write(str(message.to_message()))
897513
function(message) {
            if( !module.utils.emptyString(message) ) {
              $.api({
                url    : settings.endpoint.message,
                method : 'POST',
                data   : {
                  'message': {
                    content   : message,
                    timestamp : new Date().getTime()
                  }
                }
              });
            }
          }
38743
def print_time(self, message="Time is now: ", print_frame_info=True):
        
        if print_frame_info:
            frame_info = inspect.getouterframes(inspect.currentframe())[1]
            print(message, (datetime.now() - self.start_time), frame_info)
        else:
            print(message, (datetime.now() - self.start_time))
723060
def log_message(self, user, message):
        
        
        if isinstance(user, SeshetUser):
            user = user.nick
        elif not isinstance(user, IRCstr):
            user = IRCstr(user)

        time = datetime.utcnow()
            
        self.message_log.append((time, user, message))
        
        while len(self.message_log) > self._log_size:
            del self.message_log[0]
1058687
def set_time(time = Time.now)
      send_message(Protocol::Device::SetTime.new(time: (time.to_f * NSEC_IN_SEC).round))
    end
138859
def log_begin_message(message):
    
    global MESSAGE
    MESSAGE = message
    sys.stdout.write("[....] ")
    sys.stdout.write(message)
    sys.stdout.flush()
1256680
function writeToTraceLog($message) {
		if ($this->traceLogFile) {
			$timestamp = date("Y-m-d H:i:s");
			$timestamp = str_pad($timestamp, 20);
			if (isset($_SERVER["REMOTE_ADDR"])) {
				$ip = $_SERVER["REMOTE_ADDR"];
			} else {
				$ip = "Unknown IP";
			}
			$ip = str_pad($ip, 15);
			$taggedMessage = "$timestamp $ip $message\n";
			file_put_contents($this->traceLogFile, $taggedMessage, FILE_APPEND);
		}
		if ($this->traceLogCallback) {
			call_user_func_array($this->traceLogCallback, array($message));
		}
	}
18110
def write_message f, full=true, date=Time.now
    raise ArgumentError, "no pre-defined date: header allowed" if @header["Date"]
    f.puts format_headers(@header).first
    f.puts <<EOS
Date: #{date.rfc2822}
Message-Id: #{@message_id}
EOS
    if full
      f.puts <<EOS
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Redwood/#{Redwood::VERSION}
EOS
    end

    f.puts
    f.puts sanitize_body(@body.join("\n"))
    f.puts sig_lines if full unless $config[:edit_signature]
  end
384058
def on_message(self, message):
        
        self._record_activity()
        if hasattr(self, 'ws'):
            self.ws.write_message(message, binary=isinstance(message, bytes))
330632
def log_message(self, format, *args):
        
        clock_start = getattr(thread_local, 'clock_start', None)
        thread_local.clock_start = None
        timing = self.log_elapsed_time_string(
            get_time() - clock_start) if clock_start is not None else ''
        msg("%s[%s] %s" % (
            timing + ' ' if len(timing) else '', self.log_date_time_string(),
            format % args))
1071389
def _push_from_buffer(self):
        
        if len(self.buffer) > 0:
            if time.time() - self.last_sent_time > 5:
                try:
                    message = self.buffer.pop(0)
                    self.s.send(message.encode('utf-8'))
                    if self.verbose:
                        print(message)
                finally:
                    self.last_sent_time = time.time()
961466
def clientCutText(self, message):
        
        self.transport.write(pack("!BxxxI", 6, len(message)) + message)
1264757
def post_message(self, msg):
        ''''''
        # read the timestamp
        super(mavlogfile, self).post_message(msg)
        if self.planner_format:
            self.f.read(1) # trailing newline
        self.timestamp = msg._timestamp
        self._last_message = msg
        if msg.get_type() != "BAD_DATA":
            self._last_timestamp = msg._timestamp
        msg._link = self._link