提交 ebc30a06 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Merge pull request #273 from trey03/fix_plug-in_logger_info

Optimize the plug-in load hints
......@@ -27,7 +27,7 @@ public class PluginBootstrap {
List<URL> resources = resolver.getResources();
if (resources == null || resources.size() == 0) {
logger.info("no plugin files (skywalking-plugin.properties) found, continue to start application.");
logger.info("no plugin files (skywalking-plugin.def) found, continue to start application.");
return new ArrayList<AbstractClassEnhancePluginDefine>();
}
......@@ -35,7 +35,7 @@ public class PluginBootstrap {
try {
PluginCfg.INSTANCE.load(pluginUrl.openStream());
} catch (Throwable t) {
logger.error(t, "plugin [{}] init failure.", pluginUrl);
logger.error(t, "plugin file [{}] init failure.", pluginUrl);
}
}
......
package org.skywalking.apm.agent.core.plugin;
import org.skywalking.apm.agent.core.plugin.exception.IllegalPluginDefineException;
import org.skywalking.apm.logging.ILog;
import org.skywalking.apm.logging.LogManager;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import org.skywalking.apm.agent.core.plugin.exception.IllegalPluginDefineException;
import org.skywalking.apm.logging.ILog;
import org.skywalking.apm.logging.LogManager;
public enum PluginCfg {
INSTANCE;
......@@ -31,7 +32,7 @@ public enum PluginCfg {
pluginClassList.add(plugin);
}
} catch (IllegalPluginDefineException e) {
logger.error("Failed to format plugin define.", e);
logger.error(e,"Failed to format plugin({}) define.", pluginDefine);
}
}
} finally {
......
......@@ -24,10 +24,6 @@ public class PluginResourcesResolver {
try {
urls = getDefaultClassLoader().getResources("skywalking-plugin.def");
if (!urls.hasMoreElements()) {
logger.info("no plugin files (skywalking-plugin.def) found");
}
while (urls.hasMoreElements()) {
URL pluginUrl = urls.nextElement();
cfgUrlPaths.add(pluginUrl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册