|
@@ -568,7 +568,7 @@ std::string toLowerCase(std::string str) {
|
|
|
return str;
|
|
|
}
|
|
|
|
|
|
-SPBASE_API void* create_log_producer_storage(CSimpleStringA entityName, CSimpleStringA item, CSimpleStringA filePath)
|
|
|
+SPBASE_API void* create_log_producer_storage(CSimpleStringA entityName, CSimpleStringA item, CSimpleStringA filePath, CSimpleStringA CmptId, CSimpleString CmptName)
|
|
|
{
|
|
|
WLog_DBG(TAG, "create log producer storage for %s, %s, %s", entityName.GetData(), item.GetData(), filePath.GetData());
|
|
|
log_producer_config* config = create_log_producer_config();
|
|
@@ -590,8 +590,14 @@ SPBASE_API void* create_log_producer_storage(CSimpleStringA entityName, CSimpleS
|
|
|
log_producer_config_set_send_thread_count(config, 1);
|
|
|
log_producer_config_set_persistent_max_log_count(config, 50 * 1000);
|
|
|
log_producer_config_set_skyeye_servname(config, (char*)"Terminal");
|
|
|
- log_producer_config_set_skyeye_cmptId(config, (char*)"LR04");
|
|
|
- log_producer_config_set_skyeye_cmptname(config, (char*)"FrameworkLib");
|
|
|
+ if(CmptId.GetLength() > 0)
|
|
|
+ log_producer_config_set_skyeye_cmptId(config, (char*)CmptId.GetData());
|
|
|
+ else
|
|
|
+ log_producer_config_set_skyeye_cmptId(config, (char*)"LR04");
|
|
|
+ if(CmptName.GetLength() > 0)
|
|
|
+ log_producer_config_set_skyeye_cmptname(config, (char*)CmptName.GetData());
|
|
|
+ else
|
|
|
+ log_producer_config_set_skyeye_cmptname(config, (char*)"FrameworkLib");
|
|
|
log_producer_config_set_skyeye_version(config, (char*)"1.0");
|
|
|
log_producer_config_set_persistent(config, 1);
|
|
|
|
|
@@ -783,12 +789,12 @@ SPBASE_API bool create_log_producer_default(CSimpleStringA entityName, int idx)
|
|
|
#ifndef _WIN32
|
|
|
|
|
|
WLog_DBG(TAG, "create defaut log_producer(create log producer storage) for %s %d", entityName.GetData(), idxStr.GetData());
|
|
|
- g_logProducer = create_log_producer_storage(entityName, idxStr, "");
|
|
|
+ g_logProducer = create_log_producer_storage(entityName, idxStr, "", "", "");
|
|
|
if (g_logProducer == NULL)
|
|
|
WLog_ERR(TAG, "create log producer storage return null!");
|
|
|
return (NULL != g_logProducer);
|
|
|
#else
|
|
|
- return NULL != (g_logProducer = create_log_producer_storage(entityName, idxStr, ""));
|
|
|
+ return NULL != (g_logProducer = create_log_producer_storage(entityName, idxStr, "", "", ""));
|
|
|
#endif
|
|
|
}
|
|
|
|