mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
Tag truncated values with a flag, plus pack threading::Value better
This commit is contained in:
parent
c8818d76bd
commit
39814816af
2 changed files with 11 additions and 11 deletions
|
@ -1506,6 +1506,7 @@ threading::Value Manager::ValToLogVal(WriterInfo* info, const Stream* stream, st
|
|||
stream->max_total_string_bytes, total_string_bytes);
|
||||
|
||||
if ( allowed_bytes < static_cast<size_t>(s->Len()) ) {
|
||||
lval.truncated = true;
|
||||
reporter->Weird("log_string_field_truncated", util::fmt("%s", stream->name.c_str()));
|
||||
info->total_truncated_string_fields->Inc();
|
||||
}
|
||||
|
@ -1563,6 +1564,7 @@ threading::Value Manager::ValToLogVal(WriterInfo* info, const Stream* stream, st
|
|||
stream->max_total_container_elements, total_container_elements);
|
||||
|
||||
if ( allowed_elements < static_cast<size_t>(set->Length()) ) {
|
||||
lval.truncated = true;
|
||||
reporter->Weird("log_container_field_truncated", util::fmt("%s", stream->name.c_str()));
|
||||
info->total_truncated_containers->Inc();
|
||||
}
|
||||
|
@ -1593,6 +1595,7 @@ threading::Value Manager::ValToLogVal(WriterInfo* info, const Stream* stream, st
|
|||
stream->max_total_container_elements, total_container_elements);
|
||||
|
||||
if ( allowed_elements < static_cast<size_t>(vec->Size()) ) {
|
||||
lval.truncated = true;
|
||||
reporter->Weird("log_container_field_truncated", util::fmt("%s", stream->name.c_str()));
|
||||
info->total_truncated_containers->Inc();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue