Skip to content

Commit f882027

Browse files
Update rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml
Co-authored-by: Siegfried Weber <mail@siegfriedweber.net>
1 parent 0bd1c34 commit f882027

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • rust/operator-binary/src/controller/build/properties/product_logging

rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,17 @@ transforms:
237237
}
238238
. |= parse_regex!(.file, r'^${LOG_DIR}/(?P<container>.*?)/(?P<file>.*?)$')
239239
240+
# Filters the logs of the Vector agent according to the defined log level
240241
filtered_logs_vector:
241242
inputs:
242243
- vector
243244
type: filter
244-
condition: '!includes(["TRACE", "DEBUG"], .metadata.level)'
245+
condition: >
246+
(.metadata.level == "TRACE" && "${VECTOR_FILE_LOG_LEVEL}" == "trace") ||
247+
(.metadata.level == "DEBUG" && includes(["trace", "debug"], "${VECTOR_FILE_LOG_LEVEL}")) ||
248+
(.metadata.level == "INFO" && includes(["trace", "debug", "info"], "${VECTOR_FILE_LOG_LEVEL}")) ||
249+
(.metadata.level == "WARN" && includes(["trace", "debug", "info", "warn"], "${VECTOR_FILE_LOG_LEVEL}")) ||
250+
(.metadata.level == "ERROR" && includes(["trace", "debug", "info", "warn", "error"], "${VECTOR_FILE_LOG_LEVEL}"))
245251
246252
extended_logs_vector:
247253
inputs:

0 commit comments

Comments
 (0)