add more logs for debugging

Change-Id: I420e6e60901a32cc378c09ed57fba2ee1ac688df
This commit is contained in:
lane.wei 2022-07-26 12:23:21 +08:00 committed by Lane.Wei
parent 0d1242d9c6
commit 4d52b8a44a
2 changed files with 15 additions and 8 deletions

View file

@ -141,7 +141,9 @@ int NetworkAgent::initialize_network_module()
library = std::string("lib") + BAMBU_NETWORK_LIBRARY + ".so";
#endif*/
//netwoking_module = dlopen( library.c_str(), RTLD_LAZY);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", error, dlerror is %1%")%dlerror();
char* dll_error = dlerror();
printf("error, dlerror is %s\n", dll_error);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", error, dlerror is %1%")%dll_error;
}
printf("after dlopen, network_module is %p\n", netwoking_module);
#endif
@ -383,13 +385,13 @@ std::string NetworkAgent::get_version()
#endif
}
if (!consistent) {
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(", inconsistent libraryreturn 00.00.00.00!");
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(", inconsistent library,return 00.00.00.00!");
return "00.00.00.00";
}
if (get_version_ptr) {
return get_version_ptr();
}
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(", get_version not supportedreturn 00.00.00.00!");
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(", get_version not supported,return 00.00.00.00!");
return "00.00.00.00";
}