diff options
| author | liuxueli <[email protected]> | 2021-10-06 16:29:24 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2021-10-06 16:29:24 +0800 |
| commit | b415f15aab811740bdf90edf27fc15333707ce2c (patch) | |
| tree | 384ded0d8573392080b5b7777ad89c7eecd9f093 /src/tsg_rule.cpp | |
| parent | eade71227df822fa22e706cbd675f5d47ff855ed (diff) | |
TSG-7982: 新增公共日志字段common_device_tag
Diffstat (limited to 'src/tsg_rule.cpp')
| -rw-r--r-- | src/tsg_rule.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index 581fa4c..99392ad 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -1391,6 +1391,11 @@ static Maat_feather_t init_maat_feather(const char* conffile, char* instance_nam MESA_load_profile_string_def(conffile, "MAAT", "ACCEPT_TAGS", effective_flag, sizeof(effective_flag),"");
}
+ if(strlen(g_tsg_para.device_tag)==0 && strlen(effective_flag)>0)
+ {
+ memcpy(g_tsg_para.device_tag, effective_flag, MIN(strlen(effective_flag), sizeof(g_tsg_para.device_tag)-1));
+ }
+
if(strlen(g_tsg_para.data_center)==0 && strlen(effective_flag)>0)
{
MESA_load_profile_string_def(conffile, module, "EFFECTIVE_TAG_KEY", effective_tag_key, sizeof(effective_tag_key),"data_center");
|
