APISonar


jdk.jfr.internal.Logger.log

> jdk > jfr > internal > Logger > log
jdk APIs jfr APIs internal APIs Logger APIs log APIs

Example 1
private static void assertLargeMessageOK() {
        StringBuilder large = new StringBuilder();
        for (int i = 0; i < 1000 * 1000; i++) {
            large.append('o');
        }
        Logger.log(JFR_LOG_TAG, DEFAULT_TEST_LOG_LEVEL, large.toString());
    }
Example 2
private static void assertAllCharsOK() {
        char c = Character.MIN_VALUE;
        StringBuilder large = new StringBuilder();
        int logSize = 0;
        for(int i = Character.MIN_VALUE; i< (int)Character.MAX_VALUE; i++, c++) {
            large.append(c);
            logSize++;
            if (logSize == 80) {
                Logger.log(JFR_LOG_TAG, DEFAULT_TEST_LOG_LEVEL, large.toString());
                large = new StringBuilder();
            }
        }
    }
Example 3
private static void assertAllLevelsForTag(LogTag tag, String message) {
        for (LogLevel level : LogLevel.values()) {
            Logger.log(tag, level, message);
        }
    }
Example 4
public static List<Configuration> getConfigurations() {
        List<Configuration> configs = new ArrayList<>();
        for (KnownConfiguration knownConfig : getKnownConfigurations()) {
            try {
                configs.add(knownConfig.getConfigurationFile());
            } catch (IOException e) {
                Logger.log(LogTag.JFR, LogLevel.WARN, "Could not load configuration " + knownConfig.getName() + ". " + e.getMessage());
            } catch (ParseException e) {
                Logger.log(LogTag.JFR, LogLevel.WARN, "Could not parse configuration " + knownConfig.getName() + ". " + e.getMessage());
            }
        }
        return configs;
    }
Example 5
private long readStartTime(Path p) throws IOException {
        try (RecordingInput in = new RecordingInput(p.toFile(), fileAccess, 100)) {
            Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "Parsing header for chunk start time");
            ChunkHeader c = new ChunkHeader(in);
            return c.getStartNanos();
        }
    }
Example 6
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
        if(methodInFilter(name, desc)) {
            // If the method is one that we will be replacing, delete the method
            Logger.log(LogTag.JFR_SYSTEM_BYTECODE, LogLevel.DEBUG, "Deleting " + name + desc);
            return null;
        }
        return super.visitMethod(access, name, desc, signature, exceptions);
    }
Example 7
public JIMethodCallInliner(int access, String desc, MethodVisitor mv,
            MethodNode inlineTarget, String oldClass, String newClass) {
        super(Opcodes.ASM5, access, desc, mv);
        this.oldClass = oldClass;
        this.newClass = newClass;
        this.inlineTarget = inlineTarget;

        Logger.log(LogTag.JFR_SYSTEM_BYTECODE, LogLevel.DEBUG, "MethodCallInliner: targetMethod=" + newClass + "."
                + inlineTarget.name + inlineTarget.desc);
    }