Unable to customize the beats log storage location

Hello Team,

I have installed elasticsearch 7.2 ,filebeat,metricbeat are configured to push the metrics & logs. By default all beat logs are writing to /var/log/messages or /var/log/syslog.

i have modified -path.logs = /var/log/beats in /lib/systemd/system/metricbeat.service and changed metricbeat.yml logging options
ex:
logging.level: info
logging.to_files: true
logging.to_syslog: false
logging.files:
path: /var/log/beats
name: metricbeat

But still beats logs are writing in to /var/log/messages & syslog

is there any config i am missing here to change beat log location to custom location?

Any help much appreciated ?