From 69def56d91bb00a9e1f7e936d74db504b4fcf527 Mon Sep 17 00:00:00 2001 From: LamGC Date: Thu, 2 Sep 2021 16:28:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=B0=83=E6=95=B4=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E7=B1=BB=E7=9A=84=E5=8C=85=E8=B7=AF=E5=BE=84,=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20ScriptLoggerFactory=20=E7=9A=84=E4=BD=BF?= =?UTF-8?q?=E7=94=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/net/lamgc/oracle/sentry/ApplicationInitiation.java | 5 ++++- .../oracle/sentry/oci/compute/ssh/CommandExecSession.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/lamgc/oracle/sentry/ApplicationInitiation.java b/src/main/java/net/lamgc/oracle/sentry/ApplicationInitiation.java index cbf9885..7b769f7 100644 --- a/src/main/java/net/lamgc/oracle/sentry/ApplicationInitiation.java +++ b/src/main/java/net/lamgc/oracle/sentry/ApplicationInitiation.java @@ -3,6 +3,7 @@ package net.lamgc.oracle.sentry; import com.google.common.base.Throwables; import com.oracle.bmc.auth.AuthenticationDetailsProvider; import net.lamgc.oracle.sentry.script.ScriptComponents; +import net.lamgc.oracle.sentry.script.ScriptLoggerFactory; import net.lamgc.oracle.sentry.script.ScriptManager; import net.lamgc.oracle.sentry.script.tools.http.ScriptHttpClient; import org.apache.http.impl.client.HttpClientBuilder; @@ -95,7 +96,9 @@ class ApplicationInitiation { public ScriptManager initialScriptManager(ComputeInstanceManager instanceManager) { ScriptComponents context = new ScriptComponents(new ScriptHttpClient(HttpClientBuilder.create() .build()), - instanceManager); + instanceManager, + new ScriptLoggerFactory() + ); ScriptManager manager = new ScriptManager(new File(scriptsLocation), context); manager.loadScripts(); diff --git a/src/main/java/net/lamgc/oracle/sentry/oci/compute/ssh/CommandExecSession.java b/src/main/java/net/lamgc/oracle/sentry/oci/compute/ssh/CommandExecSession.java index 1bed13d..50f9a65 100644 --- a/src/main/java/net/lamgc/oracle/sentry/oci/compute/ssh/CommandExecSession.java +++ b/src/main/java/net/lamgc/oracle/sentry/oci/compute/ssh/CommandExecSession.java @@ -1,7 +1,7 @@ package net.lamgc.oracle.sentry.oci.compute.ssh; -import net.lamgc.oracle.sentry.common.InputStreamWrapper; -import net.lamgc.oracle.sentry.common.OutputStreamWrapper; +import net.lamgc.oracle.sentry.common.io.InputStreamWrapper; +import net.lamgc.oracle.sentry.common.io.OutputStreamWrapper; import org.apache.sshd.client.channel.ChannelExec; import org.apache.sshd.client.channel.ClientChannelEvent;