if (initializePluginManager(mode) < 0) {
_ERR("Failed to initialize PluginManager");
}
+
+ if (pluginHasLogControl()) {
+ __enableLogManager = false;
+ } else {
+ __enableLogManager = true;
+ }
}
CoreRuntime::~CoreRuntime()
return -1;
}
- if (initializeLogManager() < 0) {
- _ERR("Failed to initnialize LogManager");
- return -1;
- }
+ if (__enableLogManager) {
+ if (initializeLogManager() < 0) {
+ _ERR("Failed to initnialize LogManager");
+ return -1;
+ }
- if (redirectFD() < 0) {
- _ERR("Failed to redirect FD");
- return -1;
- }
+ if (redirectFD() < 0) {
+ _ERR("Failed to redirect FD");
+ return -1;
+ }
- if (runLoggingThread() < 0) {
- _ERR("Failed to create and run logging thread to redicrect log");
- return -1;
+ if (runLoggingThread() < 0) {
+ _ERR("Failed to create and run logging thread to redicrect log");
+ return -1;
+ }
}
std::string libCoreclr(concatPath(getRuntimeDir(), "libcoreclr.so"));
return -1;
}
- // launchpad override stdout and stderr to journalctl before launch application.
- // we have to re-override that to input pipe for logging thread.
- if (redirectFD() < 0) {
- _ERR("Failed to redirect FD");
- return -1;
+ if (__enableLogManager) {
+ // launchpad override stdout and stderr to journalctl before launch application.
+ // we have to re-override that to input pipe for logging thread.
+ if (redirectFD() < 0) {
+ _ERR("Failed to redirect FD");
+ return -1;
+ }
}
pluginSetAppInfo(appId, path);