refactor: 调整相关类的包路径, 添加 ScriptLoggerFactory 的使用.

This commit is contained in:
LamGC 2021-09-02 16:28:42 +08:00
parent cfbe0315f0
commit 69def56d91
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D
2 changed files with 6 additions and 3 deletions

View File

@ -3,6 +3,7 @@ package net.lamgc.oracle.sentry;
import com.google.common.base.Throwables; import com.google.common.base.Throwables;
import com.oracle.bmc.auth.AuthenticationDetailsProvider; import com.oracle.bmc.auth.AuthenticationDetailsProvider;
import net.lamgc.oracle.sentry.script.ScriptComponents; 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.ScriptManager;
import net.lamgc.oracle.sentry.script.tools.http.ScriptHttpClient; import net.lamgc.oracle.sentry.script.tools.http.ScriptHttpClient;
import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.HttpClientBuilder;
@ -95,7 +96,9 @@ class ApplicationInitiation {
public ScriptManager initialScriptManager(ComputeInstanceManager instanceManager) { public ScriptManager initialScriptManager(ComputeInstanceManager instanceManager) {
ScriptComponents context = new ScriptComponents(new ScriptHttpClient(HttpClientBuilder.create() ScriptComponents context = new ScriptComponents(new ScriptHttpClient(HttpClientBuilder.create()
.build()), .build()),
instanceManager); instanceManager,
new ScriptLoggerFactory()
);
ScriptManager manager = new ScriptManager(new File(scriptsLocation), context); ScriptManager manager = new ScriptManager(new File(scriptsLocation), context);
manager.loadScripts(); manager.loadScripts();

View File

@ -1,7 +1,7 @@
package net.lamgc.oracle.sentry.oci.compute.ssh; package net.lamgc.oracle.sentry.oci.compute.ssh;
import net.lamgc.oracle.sentry.common.InputStreamWrapper; import net.lamgc.oracle.sentry.common.io.InputStreamWrapper;
import net.lamgc.oracle.sentry.common.OutputStreamWrapper; import net.lamgc.oracle.sentry.common.io.OutputStreamWrapper;
import org.apache.sshd.client.channel.ChannelExec; import org.apache.sshd.client.channel.ChannelExec;
import org.apache.sshd.client.channel.ClientChannelEvent; import org.apache.sshd.client.channel.ClientChannelEvent;