Sets a custom logger for the log messages of the RequestRecorder.
The logger objects needs to implement the following functions: info, debug, warning, error

@param {object} logger The log object with the required functions.
426700
function(logger) {
			if (typeof logger != "object"
				|| typeof logger.info != "function"
				|| typeof logger.debug != "function"
				|| typeof logger.warning != "function"
				|| typeof logger.error != "function"
			) {
				throw new Error("Logger is not valid. It should implement at least the functions: info, debug, warning, error.");
			}
			_private.oLog = logger;
		}
1059971
private void setThreadLogger(BaseLogger logger, int loggingLevel) {
        baseLogger.set(logger);
        logLevel.set(loggingLevel);
        JSch.setLogger(this);
    }
499236
function useLogger(loggerOrFactoryFunction) {
    cutil.assertObjectOrFunction(loggerOrFactoryFunction, 'loggerOrFactoryFunction');

    if (typeof(loggerOrFactoryFunction) === 'function') {
      logger = loggerOrFactoryFunction();
    }
    else {
      logger = loggerOrFactoryFunction;
    }
  }
891894
def init_logger(log_requests=False):
    

    logger = logging.getLogger(__name__.split(".")[0])
    for handler in logger.handlers:  # pragma: nocover
        logger.removeHandler(handler)

    formatter = coloredlogs.ColoredFormatter(fmt="%(asctime)s: %(message)s")
    handler = logging.StreamHandler()
    handler.setLevel(logging.DEBUG)
    handler.setFormatter(formatter)
    logger.addHandler(handler)
    logger.setLevel(logging.DEBUG)
    logger.propagate = False

    if log_requests:
        requests.packages.urllib3.add_stderr_logger()
874760
function(logger){
		// add listener to the logger methods
		logger.onlog.addListener(Log4js.bind(this.doAppend, this));
		logger.onclear.addListener(Log4js.bind(this.doClear, this));
	
		this.logger = logger;
	}
1034077
def setLogger( logger )
      if logger
         if logger.is_a?( Logger )
            if @logger and @logger != logger
               @logger.closeLogFile()
            end
            @logger = logger
         end
      else
         @logger.closeLogFile() if @logger
         @logger = nil
      end
   end
18815
def setLoggerLevel(self, logger, level):
        
        if logger == 'root':
            _log = logging.getLogger()
        else:
            _log = logging.getLogger(logger)
        
        _log.setLevel(level)
        
        if level == logging.NOTSET:
            self._loggerLevels.pop(logger, None)
        else:
            self._loggerLevels[logger] = level
540644
public void addItemForLogger(Logger logger) {

        Item item = m_container.addItem(logger);
        if (item != null) {
            item.getItemProperty(TableColumn.Channel).setValue(logger.getName());
            Logger parent = logger.getParent();
            item.getItemProperty(TableColumn.ParentChannel).setValue(parent != null ? parent.getName() : "none");
            item.getItemProperty(TableColumn.File).setValue(getLogFiles(logger));
            item.getItemProperty(TableColumn.Level).setValue(LoggerLevel.fromLogger(logger));
        }
    }
888749
def init_logger
      log = Log4r::Logger.new(STANDARD_LOGGER)
      log.trunc = true

      # sanity checks since we defined log4r's dynamic levels statically
      unless (Log4r::DEBUG == DEBUG) &&
             (Log4r::INFO == INFO) &&
             (Log4r::WARN == WARN) &&
             (Log4r::ERROR == ERROR) &&
             (Log4r::FATAL == FATAL)
        raise "Logger levels do not match Log4r levels, levels may have been customized"
      end

      Log4r::Logger[STANDARD_LOGGER].level = WARN
      Log4r::Logger[STANDARD_LOGGER].trace = true

      Log4r::StderrOutputter.new :console
      Log4r::Outputter[:console].formatter = Log4r::PatternFormatter.new(:pattern => "[%l] %m")
      log.add(:console)
    end
1289813
public void setLogger(Logger logger) {

		System.out.println("LOGGER set");
//		if(logger instanceof SimpleFileLogger) {
			this.logger = logger;
			System.out.println("appender added");
			this.logger.addAppender(this);
//		}
	}
262585
def _set_log_callback(self):
        
        logger.debug("setting up event logger")

        def log_callback(event):
            logger.info("callback event: " + self.event_text(event))

        self.set_events_callback(log_callback)
833962
function expandErrors(logger) {
    var oldLogFunc = logger.log
    logger.log = function() {
      var args = Array.prototype.slice.call(arguments, 0)
      if (args.length >= 2 && args[1] instanceof Error) {
        args[1] = args[1].stack
      }
      return oldLogFunc.apply(this, args)
    };
    return logger
  }
189430
public BlockingListMaker<K, E> log(Logger logger) {
        this.logger = logger == null ? NULL_LOGGER : logger;
        return this;
    }
1086779
public function setLogger($logger = null)
    {
        if (!isset($logger)) {
            $logger = new \WebPConvert\Loggers\VoidLogger();
        }
        $this->logger = $logger;
    }
268525
def set_logger(self, log_level=logging.INFO):
        """"""
        logging.basicConfig(
            format='%(asctime)s - %(levelname)s - %(name)s - %(message)s',
            level=log_level,
            stream=sys.stderr)
        self.logger = logging.getLogger(__name__)
        logging.getLogger('requests').setLevel(logging.WARNING)
84389
public function setLogger($logger = null)
    {
        if (! (is_null($logger)
            || $logger instanceof LoggerInterface)) {
            throw new InvalidArgumentException(
                'Argument to ' . __METHOD__ .
                " must be a valid Logger Interface (aka. Monolog), " .
                get_class($logger) . ' given.'
            );
        }

        $this->logger = $logger;
    }
1066017
function makeLogger(level, method) {
	// The logger function to return takes a variable number of arguments
	// and formats like console.log
	function logger() {
		var args = [].slice.call(arguments);
		var format = level.toUpperCase() + ': (api-client) ' + args.shift();
		var logArgs = [format].concat(args);

		return console[method].apply(console, logArgs);
	}

	return (level === 'warn' || level === 'error' || level === 'info')
		? logger
		: function() {};
}