ENH: add log_dir at the beginning of init
JIRA: STUDIO-4895 Change-Id: I1eb1c4cee0383a01a6bacd2a70d7989bfb59006a
This commit is contained in:
parent
1a8bd061d1
commit
d864c0decf
|
@ -2892,14 +2892,16 @@ __retry:
|
|||
|
||||
if (create_network_agent) {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", create network agent...");
|
||||
m_agent = new Slic3r::NetworkAgent();
|
||||
//std::string data_dir = wxStandardPaths::Get().GetUserDataDir().ToUTF8().data();
|
||||
std::string data_directory = data_dir();
|
||||
|
||||
m_agent = new Slic3r::NetworkAgent(data_directory);
|
||||
|
||||
if (!m_device_manager)
|
||||
m_device_manager = new Slic3r::DeviceManager(m_agent);
|
||||
else
|
||||
m_device_manager->set_agent(m_agent);
|
||||
//std::string data_dir = wxStandardPaths::Get().GetUserDataDir().ToUTF8().data();
|
||||
std::string data_directory = data_dir();
|
||||
|
||||
|
||||
//BBS set config dir
|
||||
if (m_agent) {
|
||||
|
|
|
@ -114,12 +114,12 @@ func_put_rating_picture_oss NetworkAgent::put_rating_picture_oss_ptr = n
|
|||
func_get_model_mall_rating_result NetworkAgent::get_model_mall_rating_result_ptr = nullptr;
|
||||
|
||||
|
||||
NetworkAgent::NetworkAgent()
|
||||
NetworkAgent::NetworkAgent(std::string log_dir)
|
||||
{
|
||||
if (create_agent_ptr) {
|
||||
network_agent = create_agent_ptr();
|
||||
network_agent = create_agent_ptr(log_dir);
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", this %1%, network_agent=%2%, create_agent_ptr=%3%")%this %network_agent %create_agent_ptr;
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", this %1%, network_agent=%2%, create_agent_ptr=%3%, log_dir=%4%")%this %network_agent %create_agent_ptr %log_dir;
|
||||
}
|
||||
|
||||
NetworkAgent::~NetworkAgent()
|
||||
|
|
|
@ -9,7 +9,7 @@ using namespace BBL;
|
|||
namespace Slic3r {
|
||||
typedef bool (*func_check_debug_consistent)(bool is_debug);
|
||||
typedef std::string (*func_get_version)(void);
|
||||
typedef void* (*func_create_agent)(void);
|
||||
typedef void* (*func_create_agent)(std::string log_dir);
|
||||
typedef int (*func_destroy_agent)(void *agent);
|
||||
typedef int (*func_init_log)(void *agent);
|
||||
typedef int (*func_set_config_dir)(void *agent, std::string config_dir);
|
||||
|
@ -110,7 +110,7 @@ public:
|
|||
#endif
|
||||
static std::string get_version();
|
||||
static void* get_network_function(const char* name);
|
||||
NetworkAgent();
|
||||
NetworkAgent(std::string log_dir);
|
||||
~NetworkAgent();
|
||||
|
||||
int init_log();
|
||||
|
@ -182,7 +182,7 @@ public:
|
|||
int get_profile_3mf(BBLProfile* profile);
|
||||
int get_model_publish_url(std::string* url);
|
||||
int get_subtask(BBLModelTask* task, OnGetSubTaskFn getsub_fn);
|
||||
int get_model_mall_home_url(std::string* url);
|
||||
int get_model_mall_home_url(std::string* url);
|
||||
int get_model_mall_detail_url(std::string* url, std::string id);
|
||||
int get_my_profile(std::string token, unsigned int* http_code, std::string* http_body);
|
||||
int track_enable(bool enable);
|
||||
|
|
|
@ -12,4 +12,4 @@ set(BBL_INTERNAL_TESTING "1")
|
|||
endif()
|
||||
|
||||
# The build_version should start from 50 in master branch
|
||||
set(SLIC3R_VERSION "01.07.08.53")
|
||||
set(SLIC3R_VERSION "01.07.09.50")
|
||||
|
|
Loading…
Reference in New Issue