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

Fix log issue when initializtion.

上级 eb507496
...@@ -34,4 +34,8 @@ public enum SystemOutWriter implements IWriter { ...@@ -34,4 +34,8 @@ public enum SystemOutWriter implements IWriter {
PrintStream out = System.out; PrintStream out = System.out;
out.println(message); out.println(message);
} }
public PrintStream getStream(){
return System.out;
}
} }
...@@ -27,6 +27,7 @@ import net.bytebuddy.utility.JavaModule; ...@@ -27,6 +27,7 @@ import net.bytebuddy.utility.JavaModule;
import org.skywalking.apm.agent.core.boot.ServiceManager; import org.skywalking.apm.agent.core.boot.ServiceManager;
import org.skywalking.apm.agent.core.conf.SnifferConfigInitializer; import org.skywalking.apm.agent.core.conf.SnifferConfigInitializer;
import org.skywalking.apm.agent.core.logging.EasyLogResolver; import org.skywalking.apm.agent.core.logging.EasyLogResolver;
import org.skywalking.apm.agent.core.logging.SystemOutWriter;
import org.skywalking.apm.agent.core.plugin.AbstractClassEnhancePluginDefine; import org.skywalking.apm.agent.core.plugin.AbstractClassEnhancePluginDefine;
import org.skywalking.apm.agent.core.plugin.EnhanceContext; import org.skywalking.apm.agent.core.plugin.EnhanceContext;
import org.skywalking.apm.agent.core.plugin.PluginBootstrap; import org.skywalking.apm.agent.core.plugin.PluginBootstrap;
...@@ -66,7 +67,8 @@ public class SkyWalkingAgent { ...@@ -66,7 +67,8 @@ public class SkyWalkingAgent {
ServiceManager.INSTANCE.boot(); ServiceManager.INSTANCE.boot();
} catch (Exception e) { } catch (Exception e) {
logger.error(e, "skywalking agent shutdown."); SystemOutWriter.INSTANCE.write("skywalking agent is shutting down.");
e.printStackTrace(SystemOutWriter.INSTANCE.getStream());
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册