fix(search_family): Fix logging in ParseFieldWithAtSign (#4343)

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
This commit is contained in:
Stepan Bagritsevich
2024-12-19 18:11:13 +04:00
committed by GitHub
parent 79c4a1809b
commit c5ef553ffc

View File

@ -207,9 +207,9 @@ std::string_view ParseFieldWithAtSign(CmdArgParser* parser) {
if (absl::StartsWith(field, "@"sv)) {
field.remove_prefix(1); // remove leading @
} else {
// Temporary warning until we can throw an error
LOG(WARNING) << "bad arguments: Field name '" << field << "' should start with '@'. '@" << field
<< "' is expected";
// Temporary warning until we can throw an error. Log every 30 seconds
LOG_EVERY_T(WARNING, 30) << "bad arguments: Field name '" << field
<< "' should start with '@'. '@" << field << "' is expected";
}
return field;
}