<commit_before>package com.nhn.pinpoint.bootstrap;


import com.nhn.pinpoint.profiler.config.ProfilerConfig;
import com.nhn.pinpoint.profiler.logging.PLoggerBinder;

import com.nhn.pinpoint.profiler.logging.PLogger;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.net.URL;
import java.security.CodeSource;
import java.security.ProtectionDomain;

/**
 *
 */
public class AgentClassLoaderTest {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Test
    public void boot() throws IOException, ClassNotFoundException {
        AgentClassLoader agentClassLoader = new AgentClassLoader(new URL[0]);
        agentClassLoader.setBootClass("com.nhn.pinpoint.bootstrap.DummyAgent");
        agentClassLoader.boot("test", new DummyInstrumentation(), new ProfilerConfig());
        // TODO logger가져오는 기능이 달라져서 확인이 필요함.
        PLoggerBinder loggerBinder = (PLoggerBinder) agentClassLoader.initializeLoggerBinder();
        PLogger test = loggerBinder.getLogger("test");
        test.info("slf4j logger test");

    }

    private String getProjectLibDir() {
        // 필요는 없으나 protectionDomain을 테스트하기 좋아 내비둠.
        ProtectionDomain protectionDomain = AgentClassLoader.class.getProtectionDomain();
        CodeSource codeSource = protectionDomain.getCodeSource();
        URL location = codeSource.getLocation();

        logger.info("lib location:" + location);
        String path = location.getPath();
        // file:/D:/nhn_source/pinpoint_project/pinpoint-tomcat-profiler/target/classes/
        int dirPath = path.lastIndexOf("target/classes/");
        if (dirPath == -1) {
            throw new RuntimeException("target/classes/ not found");
        }
        String projectDir = path.substring(1, dirPath);
        return projectDir + "src/test/lib";
    }
}
<commit_msg>[강운덕] [LUCYSUS-1744] 로그 레벨 조정.<commit_after>package com.nhn.pinpoint.bootstrap;


import com.nhn.pinpoint.profiler.config.ProfilerConfig;
import com.nhn.pinpoint.profiler.logging.PLoggerBinder;

import com.nhn.pinpoint.profiler.logging.PLogger;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.net.URL;
import java.security.CodeSource;
import java.security.ProtectionDomain;

/**
 *
 */
public class AgentClassLoaderTest {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Test
    public void boot() throws IOException, ClassNotFoundException {
        AgentClassLoader agentClassLoader = new AgentClassLoader(new URL[0]);
        agentClassLoader.setBootClass("com.nhn.pinpoint.bootstrap.DummyAgent");
        agentClassLoader.boot("test", new DummyInstrumentation(), new ProfilerConfig());
        // TODO logger가져오는 기능이 달라져서 확인이 필요함.
//        PLoggerBinder loggerBinder = (PLoggerBinder) agentClassLoader.initializeLoggerBinder();
//        PLogger test = loggerBinder.getLogger("test");
//        test.info("slf4j logger test");

    }

    private String getProjectLibDir() {
        // 필요는 없으나 protectionDomain을 테스트하기 좋아 내비둠.
        ProtectionDomain protectionDomain = AgentClassLoader.class.getProtectionDomain();
        CodeSource codeSource = protectionDomain.getCodeSource();
        URL location = codeSource.getLocation();

        logger.info("lib location:" + location);
        String path = location.getPath();
        // file:/D:/nhn_source/pinpoint_project/pinpoint-tomcat-profiler/target/classes/
        int dirPath = path.lastIndexOf("target/classes/");
        if (dirPath == -1) {
            throw new RuntimeException("target/classes/ not found");
        }
        String projectDir = path.substring(1, dirPath);
        return projectDir + "src/test/lib";
    }
}

{'fraction_non_alphanumeric': 0.10808729139922978, 'fraction_numerical': 0.004107830551989731, 'mean_word_length': 3.1358811040339702, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5563691', 'n_tokens_mistral': 1191, 'n_tokens_neox': 1254, 'n_words': 218}