|
@@ -1,6 +1,6 @@
|
|
|
#include "log4upload.h"
|
|
|
#include "log4vendor.h"
|
|
|
-
|
|
|
+#include <algorithm>
|
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
@@ -62,6 +62,14 @@ const char* log4vendor_dlerror(const log4vendor_lib_t* lib)
|
|
|
|
|
|
#endif //_MSC_VER
|
|
|
|
|
|
+std::string to_lower(std::string str)
|
|
|
+{
|
|
|
+ std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c) {
|
|
|
+ return static_cast<char>(std::tolower(c));
|
|
|
+ });
|
|
|
+ return str;
|
|
|
+}
|
|
|
+
|
|
|
bool upload_helper::initialize(const cmb::log_init_config& cfg)
|
|
|
{
|
|
|
if (is_initialized()) return false;
|
|
@@ -85,7 +93,7 @@ bool upload_helper::initialize(const cmb::log_init_config& cfg)
|
|
|
//pinst_log_producer_config_switch_debug_mode(config, 1);
|
|
|
|
|
|
char value[128] = { '\0' };
|
|
|
- strcpy(value, cfg.dev_name.c_str());
|
|
|
+ strcpy(value, to_lower(cfg.dev_name).c_str());
|
|
|
pinst_log_producer_config_set_skyeye_entityname(config, value);
|
|
|
|
|
|
memset(value, '\0', sizeof(value));
|