APM-Server logs are not wrriten in respective directory

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text :slight_smile:

TIP 1: select at least one tag that further categorizes your topic. For example server for APM Server related questions, java for questions regarding the Elastic APM Java agent, or ui for questions about the APM App within Kibana.

TIP 2: Check out the troubleshooting guide first. Not only will it help you to resolve common problems faster but it also explains in more detail which information we need before we can properly help you.

Kibana version: 8.18.1

Elasticsearch version: 8.18.1

APM Server version: 8.18.1

APM Agent language and version:

Browser version: crome Version 136.0.7103.93

Original install method (e.g. download page, yum, deb, from source, etc.) and version: deb

Fresh install or upgraded from other version? upgraded from 7.17.27

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.
No

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

I have configuredthe below options for logs store
logging.to_files: true
logging.files:
path: /var/log/apm-server
name: apm-server
keepfiles: 15
permissions: 0600
interval: 24h

But log are store in only syslog
Steps to reproduce:
1.
2.
3.

Errors in browser console (if relevant): No

Provide logs and/or server output (if relevant): No

Hi @Ekta may I know how you are deploying your APM server?

@ericyap we have upgraded apm-server from 7.17.27 to 8.18.1 using .deb file dpkg -i command in Ubuntu 22.04 distribution. In 7.17.27 logs are working fine in custom location /var/log/apm-server but after upgrade log are go in syslog only. can you please help over here how to resolve this issue.

Below is the configuration regarding logs, which I have done in my yml file currently
logging.to_syslog: false
logging.to_files: true
logging.files:
path: /var/log/apm-server
name: apm-server
keepfiles: 7
permissions: 0644
interval: 24h

@Ekta The only thing I can think of regarding this regression might be [logging] - Fix a regression related to `--environment` and logging config by VihasMakwana · Pull Request #321 · elastic/elastic-agent-libs · GitHub. This fix should be included in the v8.18.3 release coming out on 24 June.

Otherwise I couldn't find anything else wrong with the logging in v8.18.1.

@ericyap ok thanks for the update we will check in 8.11.3 version

@ericyap we have upgraded version to 8.11.3 but still log are store in syslog only

Any update on it?