File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 2121#include < string>
2222
2323#define DEFAULT_REMOTE_CALL_NAME_SPACE " LLSEGlobal"
24- #define logger lse::getSelfPluginInstance ().getLogger()
2524
2625// ////////////////// Remote Call ////////////////////
2726
@@ -180,8 +179,12 @@ Local<Value> extract(RemoteCall::ValueType&& val) {
180179Local<Value> MakeRemoteCall (const string& nameSpace, const string& funcName, const Arguments& args) {
181180 auto & func = RemoteCall::importFunc (nameSpace, funcName);
182181 if (!func) {
183- logger.error (" Fail to import! Function [{}::{}] has not been exported!" , nameSpace, funcName);
184- logger.error (" In plugin <{}>" , getEngineOwnData ()->pluginName );
182+ lse::getSelfPluginInstance ().getLogger ().error (
183+ " Fail to import! Function [{}::{}] has not been exported!" ,
184+ nameSpace,
185+ funcName
186+ );
187+ lse::getSelfPluginInstance ().getLogger ().error (" In plugin <{}>" , getEngineOwnData ()->pluginName );
185188 return Local<Value>();
186189 }
187190
@@ -211,7 +214,7 @@ bool LLSEExportFunc(
211214 try {
212215 auto iter = getEngineData (engine)->exportFuncs .find (identifier);
213216 if (iter == getEngineData (engine)->exportFuncs .end ()) {
214- logger .debug (" " );
217+ lse::getSelfPluginInstance (). getLogger () .debug (" " );
215218 return " " ;
216219 }
217220 auto scriptCallback = iter->second .callback .get ();
Original file line number Diff line number Diff line change 1616extern bool isInConsoleDebugMode;
1717extern ScriptEngine* debugEngine;
1818
19- #define OUTPUT_DEBUG_SIGN () std::cout << " > " << std::flush
20-
2119bool ProcessDebugEngine (const std::string& cmd) {
2220#ifdef LEGACY_SCRIPT_ENGINE_BACKEND_PYTHON
2321 // process python debug seperately
@@ -33,11 +31,11 @@ bool ProcessDebugEngine(const std::string& cmd) {
3331 std::ostringstream sout;
3432 PrintValue (sout, result);
3533 lse::getSelfPluginInstance ().getLogger ().info (sout.str ());
36- OUTPUT_DEBUG_SIGN () ;
34+ std::cout << " > " << std::flush ;
3735 }
3836 } catch (Exception& e) {
3937 PrintException (e);
40- OUTPUT_DEBUG_SIGN () ;
38+ std::cout << " > " << std::flush ;
4139 }
4240 return false ;
4341 }
@@ -72,7 +70,7 @@ void RegisterDebugCommand() {
7270 // StartDebug
7371 lse::getSelfPluginInstance ().getLogger ().info (" Debug mode begins" );
7472 isInConsoleDebugMode = true ;
75- OUTPUT_DEBUG_SIGN () ;
73+ std::cout << " > " << std::flush ;
7674 }
7775 }
7876 });
You can’t perform that action at this time.
0 commit comments