Skip to content
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

How can i redirect etcd log to file? #7936

Closed
dearboll opened this issue May 16, 2017 · 5 comments

Comments

3 participants
@dearboll
Copy link

commented May 16, 2017

Here is just 3 params about logging flag, --debug, --log-package-levels and --log-output. How can i redirect etcd log to file? Thank you for your attention.

@heyitsanthony

This comment has been minimized.

Copy link
Contributor

commented May 16, 2017

@dearboll have you tried redirecting stderr to a file?

./bin/etcd 2>log.txt
@dearboll

This comment has been minimized.

Copy link
Author

commented May 16, 2017

I use systemd to manage my etcd process, which params will help to do that ? @heyitsanthony

@gyuho

This comment has been minimized.

Copy link
Member

commented May 16, 2017

If you run with systemd, all logs are handled via journald. You can do something like

journalctl -u YOUR_SERVICE.service -l --no-pager|less
@dearboll

This comment has been minimized.

Copy link
Author

commented May 16, 2017

@gyuho Thanks.
I wanna specify the log file for etcd to do some log process, rather than all in syslog. So etcd cannot specify a log file ?

@gyuho

This comment has been minimized.

Copy link
Member

commented May 16, 2017

@dearboll etcd has no option to specify a log file, because it can be done without it (unix pipes, journald). You can store journald logs on disk with

[Journal]
Storage=persistent

And do the log processing

@gyuho gyuho closed this May 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.