Delegate to the appropriate method of the underlying logger.
778277
public void info(Marker marker, String msg) {
        if (!logger.isInfoEnabled(marker))
            return;
        if (instanceofLAL) {
            ((LocationAwareLogger) logger).log(marker, fqcn, LocationAwareLogger.INFO_INT, msg, null, null);
        } else {
            logger.info(marker, msg);
        }
    }
638135
public <I extends Request, O extends Response> LoggingClient<I, O> build(Client<I, O> delegate) {
        return new LoggingClient<>(delegate,
                                   requestLogLevel(),
                                   successfulResponseLogLevel(),
                                   failedResponseLogLevel(),
                                   requestHeadersSanitizer(),
                                   requestContentSanitizer(),
                                   requestTrailersSanitizer(),
                                   responseHeadersSanitizer(),
                                   responseContentSanitizer(),
                                   responseTrailersSanitizer(),
                                   responseCauseSanitizer(),
                                   Sampler.create(samplingRate()));
    }
1218742
def funclog(logger):
    """"""

    # check if logger is from structlog
    use_structlog = False
    if STRUCTLOG:
        if isinstance(logger, structlog._config.BoundLoggerLazyProxy):
            real_logger = logger
            use_structlog = True
    # If a Logger object is passed in, use that.  Otherwise, get the default
    # Logger.
    if use_structlog:
        pass
    elif isinstance(logger, Logger):
        real_logger = logger
    else:
        real_logger = getLogger()

    # __qualname__ is prettier but it didn't get added until 3.5
    name_attr = '__name__' if sys.version_info < (3, 5) else '__qualname__'

    def get_arg_string(args, kwargs):
        """Convert args and kwargs to a pretty string."""
        return ', '.join(["'{}'".format(a) if type(a) == str else
                          '{}'.format(a) for a in args] +
                         ["{}='{}'".format(a, v) if type(v) == str else
                          '{}={}'.format(a, v) for a, v in sorted(kwargs.items())])

    def real_decorator(fn):
        @functools.wraps(fn)
        def wrapper(*args, **kwargs):
            frame_info = inspect.getframeinfo(inspect.stack()[1][0])
            filename = os.path.basename(frame_info.filename)
            lineno = frame_info.lineno
            func_name = getattr(fn, name_attr)
            arg_string = get_arg_string(args, kwargs)
            source_info = '{}:{}:{}({})'.format(filename, lineno, func_name,
                                                arg_string)
            if use_structlog:
                real_logger.debug(u'calling', source_info=source_info)
            else:
                real_logger.debug(u'calling %s', source_info)
            try:
                res = fn(*args, **kwargs)
            except Exception as e:
                if use_structlog:
                    real_logger.exception(
                        u'{} threw exception'.format(source_info), e=e)
                else:
                    real_logger.exception(
                        u'%s threw exception:\n%s', source_info, e)
                raise
            if use_structlog:
                real_logger.debug(u'{} returned'.format(source_info), res=res)
            else:
                real_logger.debug(u'%s returned: %s', source_info, res)
            return res
        return wrapper

    if type(logger) == type(real_decorator):
        return real_decorator(logger)

    return real_decorator
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)
949599
public static void info(Logger log, String methodName) {
        if (log.isInfoEnabled())
            log.info(buildMethodLogString(methodName));
    }
1305681
def setup_logging(logging_config, debug=False):
    """"""

    if logging_config is not None:
        logging.config.fileConfig(logging_config)

    else:
        logging.basicConfig(level=debug and logging.DEBUG or logging.ERROR)
252108
def set_logger(self, logger):
        """"""

        # we don't expect anything back
        try:
            self.library.set_logger.restype = None
        except AttributeError:
            logger.warn("Tried to set logger but method is not implemented in %s", self.engine)
            return
        # as an argument we need a pointer to a fortran log func...
        self.library.set_logger.argtypes = [
            (fortran_log_functype)]

        self.library.set_logger(fortran_log_func)
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);
//		}
	}
745504
public void log(Logger targetLogger)
    {
        Object[] argumentArray = getArgumentArray();
        if (getArgumentArray() == null) {
            log(targetLogger, getLevel(), getMarker(), getMessage(), getThrowable());
        } else {
            if (getThrowable() != null) {
                argumentArray = ArrayUtils.add(getArgumentArray(), getThrowable());
            }

            log(targetLogger, getLevel(), getMarker(), getMessage(), argumentArray);
        }
    }
1098631
def _delegate(from_owner, to_owner, method):
  
  dgate = lambda self, *args, **kwargs: getattr(getattr(self, to_owner), method)(*args, **kwargs)
  dgate.__name__ = method
  dgate.__doc__ = "Delegates to {0}.{1}: {2}".format(to_owner, method, method.__doc__)
  setattr(from_owner, method, dgate)
1147521
public void logp(Level level, String sourceClass, String sourceMethod,String msg) {
		delegateLogger.logp(level,sourceClass,sourceMethod,msg);
	}
261614
public void log(int level, String message) {

        switch (level) {
        case LOG_DEBUG:
            delegate.debug(message);
            break;
        case LOG_ERROR:
            delegate.error(message);
            break;
        case LOG_INFO:
            delegate.info(message);
            break;
        case LOG_WARNING:
            delegate.warn(message);
            break;
        default:
            break;
        }
    }
52599
private static void initializeLogger(Logger logger) {

		// Do NOT send any logging information to parent loggers.
		topLogger.setUseParentHandlers(false);

		// Remove any existing handlers.
		for (Handler handler : topLogger.getHandlers()) {
			try {
				topLogger.removeHandler(handler);
			} catch (SecurityException consumed) {
				System.err
						.println("WARNING: missing 'LoggingPermission(\"control\")' permission");
			}
		}

	}
1334096
def with_log(func):
    
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        """Inject `log` argument into wrapped function.

        :param list args: Pass through all positional arguments.
        :param dict kwargs: Pass through all keyword arguments.
        """
        decorator_logger = logging.getLogger('@with_log')
        decorator_logger.debug('Entering %s() function call.', func.__name__)
        log = kwargs.get('log', logging.getLogger(func.__name__))
        try:
            ret = func(log=log, *args, **kwargs)
        finally:
            decorator_logger.debug('Leaving %s() function call.', func.__name__)
        return ret
    return wrapper
1225029
def initialize_logging(args):
    """"""
    log_handler = logging.StreamHandler()
    log_formatter = logging.Formatter(
        "%(levelname)s %(asctime)s %(name)s:%(lineno)04d - %(message)s")
    log_handler.setFormatter(log_formatter)

    root_logger = logging.getLogger()
    root_logger.addHandler(log_handler)
    root_logger.setLevel(getattr(logging, args.loglevel))
444147
def _configure_logger():
    """"""
    if not app.debug:
        _configure_logger_for_production(logging.getLogger())
    elif not app.testing:
        _configure_logger_for_debugging(logging.getLogger())
315854
def delegate(self, success, **kwargs):
        """"""
        if success:
            self.succeeded(**kwargs)
        else:
            self.failed(**kwargs)