Queues a message to be stored.

        The message is only queued if it contained something and its level is
        not less than the recording level (``self.level``).
2798
def add(self, level, message, extra_tags='', *args, **kwargs):
        
        if not message:
            return
            # Check that the message level is not less than the recording level.
        level = int(level)
        if level < self.level:
            return
            # Add the message.
        self.added_new = True
        message = Message(level, message, extra_tags=extra_tags)
        message = self.process_message(message, *args, **kwargs)
        if message:
            self._queued_messages.append(message)
613621
def write(self, message: str) -> None:
        
        self.underlying_stream.write(message)
        self.file.write(message)
962589
def _process_queue_message(self, message_queue, new_queue_found, batch_exit,
                               start_time, timeout, batch_timeout):
        """"""

        for queue in self._filter_queues([message_queue]):
            if queue not in self._queue_set:
                if not new_queue_found:
                    new_queue_found = True
                    batch_exit = time.time() + batch_timeout
                    # Limit batch_exit to max timeout
                    if batch_exit > start_time + timeout:
                        batch_exit = start_time + timeout
                self._queue_set.add(queue)
                self.log.debug('new queue', queue=queue)

        return new_queue_found, batch_exit
1277105
def log(level, message = nil)
      level, message = :info, level if message.nil?
      Resqued::Logging.logger.send(level, self.class.name) { message }
    end
30588
def send_messages(self, messages):
        
        counter = 0
        for message in messages:
            res, _ = self._send(message)
            if res:
                counter += 1

        return counter
781412
public int sendMessage(Message message)
    {
        BaseMessageHeader messageHeader = ((BaseMessage)message).getMessageHeader();
        String strQueueType = messageHeader.getQueueType();
        String strQueueName = messageHeader.getQueueName();
        MessageSender sender = this.getMessageQueue(strQueueName, strQueueType).getMessageSender();
        if (sender != null)
            sender.sendMessage(message);
        else
            return Constant.ERROR_RETURN;  // Queue doesn't exist
        return Constant.NORMAL_RETURN;
    }
1188772
def log(self, level, message):
        '''

        '''
        if self.log_fd is not None:
            prefix = struct.pack('ii', level, len(message))
            os.write(self.log_fd, prefix)
            os.write(self.log_fd, message)
1025635
def queue(self, value):
		
		if not isinstance(value, Queue):
			raise TypeError("queue is not a Queue object")
		self._queue = value
396141
def log(self, *message):
        
        if self._logger is None:
            return
        s = " ".join([str(m) for m in message])
        self._logger.write(s+'\n')
        self._logger.flush()
435379
def write(self, msg, level=logging.INFO):
        
        if msg is not None and len(msg.strip()) > 0:
            self.logger.log(level, msg)
1130889
def finish(self, msg=None):
        
        if self._finished or self.disable:
            return        
        self._finished = True
        if msg is not None:
            self(msg)
        self._new_msg("< Exiting %s, total time: %0.4f ms", 
                      self._name, (ptime.time() - self._firstTime) * 1000)
        type(self)._depth -= 1
        if self._depth < 1:
            self.flush()
684345
def log(_self, _level, _message, *args, **kwargs):
        """
        logger = _self.opt(
            exception=_self._exception,
            record=_self._record,
            lazy=_self._lazy,
            ansi=_self._ansi,
            raw=_self._raw,
            depth=_self._depth + 1,
        )
        logger._make_log_function(_level)(logger, _message, *args, **kwargs)
845020
def __store_record(self, record):
		
		if isinstance(record, WSimpleTrackerStorage.Record) is False:
			raise TypeError('Invalid record type was')
		limit = self.record_limit()
		if limit is not None and len(self.__registry) >= limit:
			self.__registry.pop(0)
		self.__registry.append(record)
624381
def log(self, level, message):
        
        if level <= self._debug_level:
            self._write_log("debug", Settings.LogTime, message)
487304
def log(level, message):
    
    if redis_instance is None:
        __connect()

    if level not in __error_levels:
        raise InvalidErrorLevel('You have used an invalid error level. \
                Please choose in: ' + ', '.join(__error_levels))
    if channel is None:
        raise NoChannelError('Please set a channel.')
    c = '{channel}.{level}'.format(channel=channel, level=level)
    redis_instance.publish(c, message)
319819
private function keepMessage($level, $message) {
		if(static::LOG_LEVELS[$this->keepMessages] > static::LOG_LEVELS[$level]) {
			return;
		}

		if($level == '' || $level == 'LOG'){
			$keepMessage = $message;
		} else {
			$keepMessage = $level . " " . $message;
		}
		$this->logEntries[] = $keepMessage;
	}
254370
def put(self, message):
    
    with self._outgoing_lock:
      self._outgoing.append(message)
      self._outgoing_counter += 1

      # Check to see if there are pending queues waiting for the item.
      if self._outgoing_counter in self._outgoing_pending_queues:
        for q in self._outgoing_pending_queues[self._outgoing_counter]:
          q.put(message)
        del self._outgoing_pending_queues[self._outgoing_counter]