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
Closed

How can i redirect etcd log to file? #7936

dearboll opened this issue May 16, 2017 · 5 comments

Comments

@dearboll
Copy link

@dearboll dearboll 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
Copy link
Contributor

@heyitsanthony heyitsanthony commented May 16, 2017

@dearboll have you tried redirecting stderr to a file?

./bin/etcd 2>log.txt

Loading

@dearboll
Copy link
Author

@dearboll dearboll commented May 16, 2017

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

Loading

@gyuho
Copy link
Member

@gyuho gyuho 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

Loading

@dearboll
Copy link
Author

@dearboll dearboll 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 ?

Loading

@gyuho
Copy link
Member

@gyuho gyuho 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

Loading

@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
Labels
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants