Skip to content

Commit

Permalink
When REGEX_LOG is set, mTimeKey will be set to "time". (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
quzard authored and yyuuttaaoo committed Jan 2, 2024
1 parent dcfd61a commit 56da3a5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/config_manager/ConfigManagerBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ void ConfigManagerBase::LoadSingleUserConfig(const std::string& logName, const J
config->mLogDelaySkipBytes = value["delay_skip_bytes"].asInt64();
}


config->mTimeKey = GetStringValue(value, "time_key", "");
if (logType == REGEX_LOG) {
config->mTimeFormat = GetStringValue(value, "timeformat", "");
GetRegexAndKeys(value, config);
Expand All @@ -858,10 +858,11 @@ void ConfigManagerBase::LoadSingleUserConfig(const std::string& logName, const J
config->mSimpleLogFlag = true;
}
}
if (config->mTimeKey == ""){
config->mTimeKey = "time";
}
}

config->mTimeKey = GetStringValue(value, "time_key", "");

config->mTailExisted = GetBoolValue(value, "tail_existed", false);
int32_t tailLimit = GetIntValue(value, "tail_limit", INT32_FLAG(default_tail_limit_kb));
config->SetTailLimit(tailLimit);
Expand Down

0 comments on commit 56da3a5

Please sign in to comment.