Default logging behavior. Outputs to $stdout using #puts and return
 the message.
198178
def output!
      output  = "#{Time.now} | "
      output += "[#{@namespace.gsub('_', ' ')}] " unless @namespace.nil?
      output += @message
      puts output if defined?(Logg::ALWAYS_PUTS) && Logg::ALWAYS_PUTS
      return output
    end
864904
function outputToStdout(prettyPrint) {
  if (prettyPrint && !_.isNumber(prettyPrint)) {
    prettyPrint = 4;
  }
  return function(err, value, callback) {
    if (err) {
      console.error(err);
    } else {
      var str = JSON.stringify(value, null, prettyPrint);
      console.log(str);
    }
    callback(err, value);
  };
}
510083
def default_logger
      logger = Logger.new(STDOUT)
      logger.level = Logger::DEBUG
      logger
    end
18577
function rlog()
    {
      process.stdout.clearLine();
      process.stdout.cursorTo(0);
      console.log.apply(console, arguments);
      rl.prompt();
    }
232421
def configure_stdout_logger(log_level=logging.DEBUG):
    """"""
    root = logging.getLogger()
    root.setLevel(log_level)

    handler = logging.StreamHandler()
    handler.setLevel(log_level)
    handler.setFormatter(logging.Formatter(LOG_FORMAT_ESCAPED))

    root.addHandler(handler)
376348
def _create_stdout_logger():
    
    log = logging.getLogger(__name__)
    out_hdlr = logging.StreamHandler(sys.stdout)
    out_hdlr.setFormatter(logging.Formatter('%(message)s'))
    out_hdlr.setLevel(logging.INFO)
    log.addHandler(out_hdlr)
    log.setLevel(logging.INFO)
816131
function OutputTee(logfileOutput, terminalOutput) {

    this._outputs = [];
    this._outputs[_OUTPUT_TEE_LOGFILE] = logfileOutput;
    this._outputs[_OUTPUT_TEE_TERMINAL] = terminalOutput;
}
668345
def execute(output: $stdout, errors: $stderr)
      if empty_name?
        output.puts 'No name given'
        return false
      end
      result = run "find #{@path} #{type} -name '#{@name}'" do |_out, err|
        errors << err if err
      end
      # The following line makes the output into something readable
      #
      # Before the output would have looked like this:
      ## ./lib/my_file.rb
      ## ./lib/folder/my_file.rb
      #
      # Whereas it will now look like this:
      ## ./lib/my_file.rbi NEW_NAME=> ./lib/my_file.rb
      ## ./lib/folder/my_file.rb NEW_NAME=> ./lib/folder/my_file.rb
      #
      # Making it more obvious that the original path is on the left
      # and the path to edit is on the right
      @result = result.out.split("\n").map { |path| "#{path} NEW_NAME=> #{path}" }.join("\n")
    rescue TTY::Command::ExitError => error
      output.puts error
    end
1031525
def _create_stdout_logger(logging_level):
    
    out_hdlr = logging.StreamHandler(sys.stdout)
    out_hdlr.setFormatter(logging.Formatter(
        '[%(asctime)s] %(message)s', "%H:%M:%S"
    ))
    out_hdlr.setLevel(logging_level)
    for name in LOGGING_NAMES:
        log = logging.getLogger(name)
        log.addHandler(out_hdlr)
        log.setLevel(logging_level)
1278096
def _on_process_stdout_ready(self):
        
        if not self:
            return
        o = self.readAllStandardOutput()
        try:
            output = bytes(o).decode(self._encoding)
        except TypeError:
            output = bytes(o.data()).decode(self._encoding)
        for line in output.splitlines():
            self._srv_logger.log(1, line)
1040062
def dumps(self):
		
		out = ""
		for option in self.options:
			value = make_value(option.default_value)
			out += "%s = %s%s\n" % (option.name, value, 
				(" # %s" % option.comment) if option.comment else "")
		return out.rstrip("\n")
884706
def output_redirect(stdout, stderr):
  
  import sys
  import threading
  if not redirect:
    originals = (sys.stdout.write, sys.stderr.write)

    class Logger:
      def __init__(self, fun):
        self.buffer = ""
        self.fun = fun

      def logs(self):
        logs = redirect.get(threading.current_thread(), originals)[self.fun]
        # sys.__stdout__.write('hello ' + str(threading.current_thread()))
        if not isinstance(logs, (list, tuple)):
          logs = [logs]
        return logs

      def write(self, s):
        self.buffer += s
        lines = self.buffer.splitlines(keepends=True)
        last = lines[-1]
        if lines[-1][-1] != '\n':
          self.buffer = lines[-1]
          lines = lines[:-1]
        else:
          self.buffer = ""

        for line in lines:
          for log in self.logs():
            getattr(log, 'write', lambda x: log(x))(line)

      def flush_buffer(self):
        if self.buffer:
          for log in self.logs():
            getattr(log, 'write', lambda x: log(x))(self.buffer)

      def close(self):
        for log in self.logs():
          # self.flush_buffer()
          getattr(log, 'close', lambda: None)()

    lsout = Logger(0)
    sys.stdout.write = lsout.write
    sys.stdout.close = lsout.close
    lserr = Logger(1)
    sys.stderr.write = lserr.write
    sys.stderr.close = lserr.close

  # print('red ', threading.current_thread())
  thread = threading.current_thread()
  redirect.update({thread: (stdout, stderr)})
  try:
    yield
  except Exception as e:
    r = redirect.pop(thread, None)
    getattr(r, 'flush_buffer', lambda: None)()
    raise Exception(e) from e
  else:
    r = redirect.pop(thread, None)
    getattr(r, 'flush_buffer', lambda: None)()
886667
function log () {
  if (mocking) {
    cli.stdout += stripAnsi(concatArguments(arguments) + '\n')
  } else {
    console.log.apply(null, arguments)
  }
}
930917
protected function output()
    {
        // first get content to local var
        $content = $this->getContentRaw();

        // iterate log content
        foreach ($content as $logEntry) {
            // Get color
            $color = $this->getColorByType($logEntry['type']);

            // Show the message
            pre(
                $logEntry['time'].' '.
                '['.$logEntry['type'].'] '.
                $logEntry['fingerprint'].' '.
                $logEntry['message'].
                $this->getLineSeparator(),
                false,
                $color
            );
        }

        // So we can clear the existing log
        $this->clear();
    }
1129711
def print_input message, level=:debug
      return if LEVELS.index(level) > LEVELS.index(@@log_level)
      puts format_lhs("", "", "<") + message, :default
    end
26663
def start_logging(out=_stdout, level='info'):
    
    global _log_level, _loggers, _started_logging
    if level not in log_levels:
        raise RuntimeError(
            "Invalid log level '{0}'; valid are: {1}".format(
                level, ', '.join(log_levels)
            )
        )

    if _started_logging:
        return

    _started_logging = True
    _log_level = level

    handler = _TxaioFileHandler(out)
    logging.getLogger().addHandler(handler)
    # note: Don't need to call basicConfig() or similar, because we've
    # now added at least one handler to the root logger
    logging.raiseExceptions = True  # FIXME
    level_to_stdlib = {
        'critical': logging.CRITICAL,
        'error': logging.ERROR,
        'warn': logging.WARNING,
        'info': logging.INFO,
        'debug': logging.DEBUG,
        'trace': logging.DEBUG,
    }
    logging.getLogger().setLevel(level_to_stdlib[level])
    # make sure any loggers we created before now have their log-level
    # set (any created after now will get it from _log_level
    for logger in _loggers:
        logger._set_log_level(level)
718763
function log() {
  var _console;

  return Postmate.debug ? (_console = console).log.apply(_console, arguments) : null;
}