-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd causes always logging to stdout #2163
Comments
Thank you for the report! Have you seen the documentation for logging with systemd? It has a detailed explanation on how to customize logging with systemd, by using the BEAT_LOG_OPTS parameter. |
Ok, that's a good point. Thank you for pointing this out. Interesting approach. Good to know. |
Thanks again for bringing this up. The behavior is inherited from libbeat though. You're very welcome to open an enhancement issue in beats for further discussions. I am going to close this one, as it is expected behavior and changes would need to be applied in libbeat first. |
By default, the apm-server systemd file in 7.0.0 as well as 7.0.1 is adding the -e option. This causes that configuration in apm-server.yml around
logging.to_files: true
is not possible at the moment, because no log files will be written.
I have tested under both, Redhat and Ubuntu.
I've temporarily changed the value in the systemd file
/etc/systemd/system/multi-user.target.wants/apm-server.service
from
to
This didn't break in the tests any functionality.
Without configuration of logging.to_files it just landed in
and with configuration of logging.to_files: true the logfile was normally written under
/var/log/apm-server
or wherever you configure the destination path.
I found that there was a decision for adding the -e parameter here:
elastic/beats#8942
https://github.com/elastic/apm-server/blob/master/changelogs/7.0.asciidoc#apm-server-version-700-alpha2
but it should be taken into consideration that it did break the to_files possibility.
The text was updated successfully, but these errors were encountered: