v0.31.5
This commit is contained in:
1 parent
d942c1a35d
commit
75104f87ba
103 files changed
+1344
-370
No files matched your search
@@ -351,6 +351,36 @@ fn parse_raw_error_record(line: &str) -> Value {
|
||||
Value::Object(object)
|
||||
}
|
||||
|
||||
fn file_log_aggregate_values(value: &Value, output: &mut Vec<String>) {
|
||||
if output.len() >= 16 {
|
||||
return;
|
||||
}
|
||||
match value {
|
||||
Value::Null => {}
|
||||
Value::Bool(value) => output.push(value.to_string()),
|
||||
Value::Number(value) => output.push(value.to_string()),
|
||||
Value::String(value) => {
|
||||
let rendered = if value.chars().count() > 512 {
|
||||
value.chars().take(512).collect::<String>()
|
||||
} else {
|
||||
value.clone()
|
||||
};
|
||||
if !rendered.is_empty() {
|
||||
output.push(rendered);
|
||||
}
|
||||
}
|
||||
Value::Array(values) => {
|
||||
for value in values.iter().take(16) {
|
||||
file_log_aggregate_values(value, output);
|
||||
if output.len() >= 16 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Value::Object(_) => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn collect_file_log_fields(value: &Value, output: &mut std::collections::BTreeSet<String>) {
|
||||
fn walk(prefix: &str, value: &Value, output: &mut std::collections::BTreeSet<String>) {
|
||||
if output.len() >= 64 {
|
||||
|
||||
Reference in new issue
Block a user