:_mod-docs-content-type: ASSEMBLY
include::_attributes/common-attributes.adoc[]
include::_attributes/attributes-openshift-dedicated.adoc[]
[id="logging-input-spec-filtering"]
= Filtering logs by metadata
:context: logging-input-spec-filtering

toc::[]


You can filter logs in the `ClusterLogForwarder` CR to select or ignore an entire log stream based on the metadata by using the `input` selector. As an administrator or developer, you can include or exclude the log collection to reduce the memory and CPU load on the collector.

[IMPORTANT]
====
You can use this feature only if the Vector collector is set up in your logging deployment.
====

[NOTE]
====
`input` spec filtering is different from content filtering. `input` selectors select or ignore entire log streams based on the source metadata. Content filters edit the log streams to remove and modify the records based on the record content.
====

include::modules/logging-input-spec-filter-namespace-container.adoc[leveloffset=+1]
include::modules/logging-input-spec-filter-labels-expressions.adoc[leveloffset=+1]
include::modules/logging-input-spec-filter-audit-infrastructure.adoc[leveloffset=+1]