-
Notifications
You must be signed in to change notification settings - Fork 36
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
Allow logging to a file via a cli flag #53
Comments
I have made a few changes to be able to choose the facility using an env var, and if not set use the default "user". Here is what a would apply first:
|
@jimonreal That is a good start, but ideally I could still just log to a flat file and have splunk ingest that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The mesosphere marathon package for redhat logs via logger, which gets hoovered up into the systemd journal on RHEL/CentOS 7 or Fedora. It would be really nice to instead send this to a specific file in addition to the systemd journal.
Since marathon uses this library to do logging, the issue seems to be here and not in marathon directly. I've added this systemd service as a stopgap so we can use splunk to read marathon logs:
[Unit] Description=Hack to log marathon logs to a file After=network-online.target Wants=network.target [Service] ExecStart=/bin/bash -c "/usr/bin/journalctl --quiet -lfu marathon >> /var/log/marathon/marathon.log" Restart=always RestartSec=1 [Install] WantedBy=multi-user.target
And I've added
Requires=marathon-logger.service
to the marathon systemd unit to startmarathon-logger
on demand. Would it be possible to have chaos, and as a nice side effect, marathon support something like:--log_level=info --log_file=/var/log/marathon/marathon.log
A simple logrotate config like this could be used so that chaos wouldn't natively need to rotate any logs:
/var/log/marathon/*.log { daily compress missingok rotate 30 notifempty copytruncate delaycompress }
The text was updated successfully, but these errors were encountered: