Codec multiline

Can we add below codec => multiline in filter section ?

if [sourcetype =~ /error/]
{
codec => multiline {
pattern => "(^%{TOMCAT_DATESTAMP})|(^%{CATALINA_DATESTAMP})"
negate => true
what => "previous"
}
}

No. codecs are used in inputs and outputs, not filters.

Thank you. But it throws configuration error in output section too.