mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
[Refactor] rename and remove useless log
This commit is contained in:
1 parent
2ce6a8e192
commit
ab9369d8b7
3 files changed
+1
-9
No files matched your search
@@ -2,7 +2,7 @@
|
||||
#include <jvm/jvmti.h>
|
||||
#include <stdio.h>
|
||||
#include <JuiceAgent/Logger.hpp>
|
||||
#include <libagent.h>
|
||||
#include <libloader.h>
|
||||
#include <thread>
|
||||
#include <tinytoml/toml.h>
|
||||
#include <JuiceAgent/JuiceAgent.h>
|
||||
@@ -208,11 +208,9 @@ static int InvokeJuiceLoaderInit(const char* ConfigDir) {
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
bool InitJuiceAgent(const char* runtime_path) {
|
||||
PLOGI << "--------> InitJuiceAgent Invoke <--------";
|
||||
PLOGD << "runtime_path: " << runtime_path;
|
||||
|
||||
// Read Config
|
||||
PLOGI << "ReadConfig ...";
|
||||
if (ReadConfig(runtime_path) != 0) {
|
||||
PLOGE << "ReadConfig failed";
|
||||
return false;
|
||||
@@ -220,7 +218,6 @@ bool InitJuiceAgent(const char* runtime_path) {
|
||||
PLOGI << "[OK] ReadConfig";
|
||||
|
||||
// Get JavaEnv
|
||||
PLOGI << "Get JavaEnv ...";
|
||||
if (GetJavaEnv() != 0) {
|
||||
PLOGE << "GetJavaEnv failed";
|
||||
return false;
|
||||
@@ -228,7 +225,6 @@ bool InitJuiceAgent(const char* runtime_path) {
|
||||
PLOGI << "[OK] Get JavaEnv";
|
||||
|
||||
// Inject JuiceLoader jar
|
||||
PLOGI << "Inject JuiceLoader jar ...";
|
||||
if (JuiceAgent.jvmti->AddToSystemClassLoaderSearch(InjectionInfo.JuiceLoaderJarPath) != JNI_OK) {
|
||||
PLOGE << "AddToSystemClassLoaderSearch failed";
|
||||
return false;
|
||||
@@ -236,7 +232,6 @@ bool InitJuiceAgent(const char* runtime_path) {
|
||||
PLOGI << "[OK] Inject JuiceLoader jar";
|
||||
|
||||
// Invoke JuiceLoader Init
|
||||
PLOGI << "Invoke JuiceLoader Init ...";
|
||||
if (InvokeJuiceLoaderInit(runtime_path) != 0) {
|
||||
PLOGE << "Invoke JuiceLoader Init failed";
|
||||
return false;
|
||||
|
||||
File renamed without changes.
@@ -8,10 +8,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved ) {
|
||||
case DLL_PROCESS_ATTACH: {
|
||||
InitLogger();
|
||||
PLOGI << "DllMain: DLL_PROCESS_ATTACH";
|
||||
PLOGD.printf("lpReserved: %p", lpReserved);
|
||||
|
||||
const char* runtime_dir = (const char*)lpReserved;
|
||||
PLOGD << "runtime_dir: " << runtime_dir;
|
||||
|
||||
InitJuiceAgent(runtime_dir);
|
||||
|
||||
@@ -29,7 +27,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved ) {
|
||||
|
||||
case DLL_PROCESS_DETACH: {
|
||||
PLOGI << "DllMain: DLL_PROCESS_DETACH";
|
||||
PLOGD.printf("lpReserved: %p", lpReserved);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user