Sending Log4j logs(in XML format) to Elasticsearch using Filebeat

Hello,

I need to send log files generated using Log4j on client machines to Elasticsearch installed on a server. I'm using Filebeat, but not Logstash.

Is there any other plugin, etc required, or can it just be done using Filebeat itself?

Thanks,
Jy

As mentioned here:

https://www.elastic.co/guide/en/logstash/current/plugins-inputs-log4j.html

"This plugin is deprecated. It is recommended that you use filebeat to collect logs from log4j."

So, how do we collect logs from log4j using Filebeat?

Thanks.