APISonar


jdk.nashorn.internal.runtime.DebugLogger.log

> jdk > nashorn > internal > runtime > DebugLogger > log
jdk APIs nashorn APIs internal APIs runtime APIs DebugLogger APIs log APIs

Example 1
private static void stacktrace(final DebugLogger logger) {
        if (!PRINT_STACKTRACE) {
            return;
        }
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        final PrintStream ps = new PrintStream(baos);
        new Throwable().printStackTrace(ps);
        logger.log(TRACE_LEVEL, baos.toString());
    }
Example 2
static Object traceReturn(final DebugLogger logger, final Object value) {
        final String str = "\treturn: " + stripName(value) + " [type=" + (value == null ? "null" : stripName(value.getClass()) + ']');
        logger.log(TRACE_LEVEL, str);
        return value;
    }