You're right, logs should be stored as files locally and sent to centralized system in other way.
Solution I plan to use is to send data (as JSON single lines) from log4j2 to logstash input TCP or UDP plugin with json codec applied on input.
So i think we can close this thread.
Many thanks for your explanations !