Problem solved.
my final code is:
input{
file {
path => ["/home/katia/FichiersLog/SAMIA/gest1.txt"]
start_position => beginning
codec => multiline {
charset => "BINARY"
pattern => "^%{YEAR}%{MONTHNUM2}%{MONTHDAY}"
negate => true
what => previous
}
}
}
thank you very much for your time.