Java 类jdk.nashorn.internal.runtime.logging.Loggable 实例源码

项目:openjdk9    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @param initHook an init hook - if this is the first time the logger is created in the context, run the init hook
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz, final Consumer<DebugLogger> initHook) {
    final String name = getLoggerName(clazz);
    DebugLogger logger = loggers.get(name);
    if (logger == null) {
        if (!env.hasLogger(name)) {
            return DebugLogger.DISABLED_LOGGER;
        }
        final LoggerInfo info = env._loggers.get(name);
        logger = new DebugLogger(name, info.getLevel(), info.isQuiet());
        if (initHook != null) {
            initHook.accept(logger);
        }
        loggers.put(name, logger);
    }
    return logger;
}
项目:kaziranga    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @param initHook an init hook - if this is the first time the logger is created in the context, run the init hook
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz, final Consumer<DebugLogger> initHook) {
    final String name = getLoggerName(clazz);
    DebugLogger logger = loggers.get(name);
    if (logger == null) {
        if (!env.hasLogger(name)) {
            return DebugLogger.DISABLED_LOGGER;
        }
        final LoggerInfo info = env._loggers.get(name);
        logger = new DebugLogger(name, info.getLevel(), info.isQuiet());
        if (initHook != null) {
            initHook.accept(logger);
        }
        loggers.put(name, logger);
    }
    return logger;
}
项目:lookaside_java-1.8.0-openjdk    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @param initHook an init hook - if this is the first time the logger is created in the context, run the init hook
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz, final Consumer<DebugLogger> initHook) {
    final String name = getLoggerName(clazz);
    DebugLogger logger = loggers.get(name);
    if (logger == null) {
        if (!env.hasLogger(name)) {
            return DebugLogger.DISABLED_LOGGER;
        }
        final LoggerInfo info = env._loggers.get(name);
        logger = new DebugLogger(name, info.getLevel(), info.isQuiet());
        if (initHook != null) {
            initHook.accept(logger);
        }
        loggers.put(name, logger);
    }
    return logger;
}
项目:jdk8u_nashorn    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @param initHook an init hook - if this is the first time the logger is created in the context, run the init hook
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz, final Consumer<DebugLogger> initHook) {
    final String name = getLoggerName(clazz);
    DebugLogger logger = loggers.get(name);
    if (logger == null) {
        if (!env.hasLogger(name)) {
            return DebugLogger.DISABLED_LOGGER;
        }
        final LoggerInfo info = env._loggers.get(name);
        logger = new DebugLogger(name, info.getLevel(), info.isQuiet());
        if (initHook != null) {
            initHook.accept(logger);
        }
        loggers.put(name, logger);
    }
    return logger;
}
项目:infobip-open-jdk-8    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @param initHook an init hook - if this is the first time the logger is created in the context, run the init hook
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz, final Consumer<DebugLogger> initHook) {
    final String name = getLoggerName(clazz);
    DebugLogger logger = loggers.get(name);
    if (logger == null) {
        if (!env.hasLogger(name)) {
            return DebugLogger.DISABLED_LOGGER;
        }
        final LoggerInfo info = env._loggers.get(name);
        logger = new DebugLogger(name, info.getLevel(), info.isQuiet());
        if (initHook != null) {
            initHook.accept(logger);
        }
        loggers.put(name, logger);
    }
    return logger;
}
项目:OpenJSharp    文件:Context.java   
private void initLoggers() {
    ((Loggable)MethodHandleFactory.getFunctionality()).initLogger(this);
}
项目:openjdk-jdk10    文件:Context.java   
private void initLoggers() {
    ((Loggable)MethodHandleFactory.getFunctionality()).initLogger(this);
}
项目:openjdk9    文件:Context.java   
private void initLoggers() {
    ((Loggable)MethodHandleFactory.getFunctionality()).initLogger(this);
}
项目:kaziranga    文件:Context.java   
private void initLoggers() {
    ((Loggable)MethodHandleFactory.getFunctionality()).initLogger(this);
}
项目:lookaside_java-1.8.0-openjdk    文件:Context.java   
private void initLoggers() {
    ((Loggable)MethodHandleFactory.getFunctionality()).initLogger(this);
}
项目:jdk8u_nashorn    文件:Context.java   
private void initLoggers() {
    ((Loggable)MethodHandleFactory.getFunctionality()).initLogger(this);
}
项目:infobip-open-jdk-8    文件:Context.java   
private void initLoggers() {
    ((Loggable)MethodHandleFactory.getFunctionality()).initLogger(this);
}
项目:OpenJSharp    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 *
 * @param clazz            loggable
 * @param level            log level
 * @param mh               method handle
 * @param paramStart       first parameter to print
 * @param printReturnValue should we print the return vaulue?
 * @param text             debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final Level level, final MethodHandle mh, final int paramStart, final boolean printReturnValue, final Supplier<String> text) {
    final DebugLogger log = getLogger(clazz);
    if (log.isEnabled()) {
        return MethodHandleFactory.addDebugPrintout(log, level, mh, paramStart, printReturnValue, text.get());
    }
    return mh;
}
项目:openjdk-jdk10    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 *
 * @param clazz            loggable
 * @param level            log level
 * @param mh               method handle
 * @param paramStart       first parameter to print
 * @param printReturnValue should we print the return value?
 * @param text             debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final Level level, final MethodHandle mh, final int paramStart, final boolean printReturnValue, final Supplier<String> text) {
    final DebugLogger log = getLogger(clazz);
    if (log.isEnabled()) {
        return MethodHandleFactory.addDebugPrintout(log, level, mh, paramStart, printReturnValue, text.get());
    }
    return mh;
}
项目:openjdk9    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 *
 * @param clazz            loggable
 * @param level            log level
 * @param mh               method handle
 * @param paramStart       first parameter to print
 * @param printReturnValue should we print the return value?
 * @param text             debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final Level level, final MethodHandle mh, final int paramStart, final boolean printReturnValue, final Supplier<String> text) {
    final DebugLogger log = getLogger(clazz);
    if (log.isEnabled()) {
        return MethodHandleFactory.addDebugPrintout(log, level, mh, paramStart, printReturnValue, text.get());
    }
    return mh;
}
项目:kaziranga    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 *
 * @param clazz            loggable
 * @param level            log level
 * @param mh               method handle
 * @param paramStart       first parameter to print
 * @param printReturnValue should we print the return vaulue?
 * @param text             debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final Level level, final MethodHandle mh, final int paramStart, final boolean printReturnValue, final Supplier<String> text) {
    final DebugLogger log = getLogger(clazz);
    if (log.isEnabled()) {
        return MethodHandleFactory.addDebugPrintout(log, level, mh, paramStart, printReturnValue, text.get());
    }
    return mh;
}
项目:lookaside_java-1.8.0-openjdk    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 *
 * @param clazz            loggable
 * @param level            log level
 * @param mh               method handle
 * @param paramStart       first parameter to print
 * @param printReturnValue should we print the return value?
 * @param text             debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final Level level, final MethodHandle mh, final int paramStart, final boolean printReturnValue, final Supplier<String> text) {
    final DebugLogger log = getLogger(clazz);
    if (log.isEnabled()) {
        return MethodHandleFactory.addDebugPrintout(log, level, mh, paramStart, printReturnValue, text.get());
    }
    return mh;
}
项目:jdk8u_nashorn    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 *
 * @param clazz            loggable
 * @param level            log level
 * @param mh               method handle
 * @param paramStart       first parameter to print
 * @param printReturnValue should we print the return value?
 * @param text             debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final Level level, final MethodHandle mh, final int paramStart, final boolean printReturnValue, final Supplier<String> text) {
    final DebugLogger log = getLogger(clazz);
    if (log.isEnabled()) {
        return MethodHandleFactory.addDebugPrintout(log, level, mh, paramStart, printReturnValue, text.get());
    }
    return mh;
}
项目:infobip-open-jdk-8    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 *
 * @param clazz            loggable
 * @param level            log level
 * @param mh               method handle
 * @param paramStart       first parameter to print
 * @param printReturnValue should we print the return vaulue?
 * @param text             debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final Level level, final MethodHandle mh, final int paramStart, final boolean printReturnValue, final Supplier<String> text) {
    final DebugLogger log = getLogger(clazz);
    if (log.isEnabled()) {
        return MethodHandleFactory.addDebugPrintout(log, level, mh, paramStart, printReturnValue, text.get());
    }
    return mh;
}
项目:OpenJSharp    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz) {
    return getLogger(clazz, null);
}
项目:OpenJSharp    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 * Level.INFO is used
 *
 * @param clazz loggable
 * @param mh    method handle
 * @param text  debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final MethodHandle mh, final Supplier<String> text) {
    return addLoggingToHandle(clazz, Level.INFO, mh, Integer.MAX_VALUE, false, text);
}
项目:openjdk-jdk10    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz) {
    return getLogger(clazz, null);
}
项目:openjdk-jdk10    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 * Level.INFO is used
 *
 * @param clazz loggable
 * @param mh    method handle
 * @param text  debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final MethodHandle mh, final Supplier<String> text) {
    return addLoggingToHandle(clazz, Level.INFO, mh, Integer.MAX_VALUE, false, text);
}
项目:openjdk9    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz) {
    return getLogger(clazz, null);
}
项目:openjdk9    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 * Level.INFO is used
 *
 * @param clazz loggable
 * @param mh    method handle
 * @param text  debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final MethodHandle mh, final Supplier<String> text) {
    return addLoggingToHandle(clazz, Level.INFO, mh, Integer.MAX_VALUE, false, text);
}
项目:kaziranga    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz) {
    return getLogger(clazz, null);
}
项目:kaziranga    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 * Level.INFO is used
 *
 * @param clazz loggable
 * @param mh    method handle
 * @param text  debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final MethodHandle mh, final Supplier<String> text) {
    return addLoggingToHandle(clazz, Level.INFO, mh, Integer.MAX_VALUE, false, text);
}
项目:lookaside_java-1.8.0-openjdk    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz) {
    return getLogger(clazz, null);
}
项目:lookaside_java-1.8.0-openjdk    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 * Level.INFO is used
 *
 * @param clazz loggable
 * @param mh    method handle
 * @param text  debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final MethodHandle mh, final Supplier<String> text) {
    return addLoggingToHandle(clazz, Level.INFO, mh, Integer.MAX_VALUE, false, text);
}
项目:jdk8u_nashorn    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz) {
    return getLogger(clazz, null);
}
项目:jdk8u_nashorn    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 * Level.INFO is used
 *
 * @param clazz loggable
 * @param mh    method handle
 * @param text  debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final MethodHandle mh, final Supplier<String> text) {
    return addLoggingToHandle(clazz, Level.INFO, mh, Integer.MAX_VALUE, false, text);
}
项目:infobip-open-jdk-8    文件:Context.java   
/**
 * Get a logger, given a loggable class
 * @param clazz a Loggable class
 * @return debuglogger associated with that class
 */
public DebugLogger getLogger(final Class<? extends Loggable> clazz) {
    return getLogger(clazz, null);
}
项目:infobip-open-jdk-8    文件:Context.java   
/**
 * Given a Loggable class, weave debug info info a method handle for that logger.
 * Level.INFO is used
 *
 * @param clazz loggable
 * @param mh    method handle
 * @param text  debug printout to add
 *
 * @return instrumented method handle, or null if logger not enabled
 */
public MethodHandle addLoggingToHandle(final Class<? extends Loggable> clazz, final MethodHandle mh, final Supplier<String> text) {
    return addLoggingToHandle(clazz, Level.INFO, mh, Integer.MAX_VALUE, false, text);
}