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 to do log rotation? #23723

Closed
wangfenjin opened this issue Oct 13, 2021 · 1 comment
Closed

How to do log rotation? #23723

wangfenjin opened this issue Oct 13, 2021 · 1 comment

Comments

@wangfenjin
Copy link

I had post this question in stackexchange but seems no one can answer the question, so I think I can post in here.

I find this PR ethereumproject/go-ethereum#426 but it's in the previous repo.

I don't see any options allow me to do log rotate from here https://geth.ethereum.org/docs/interface/command-line-options

So how should we do log rotation? Thanks.

@holiman
Copy link
Contributor

holiman commented Oct 13, 2021

We decided not to handle 'advanced logging' inside go-ethereum. There have, historically, been suggestions to implement log output to file, which leads to: implement log rotation. The latter of these is pretty intricate, since it involves rotating files and compressing older files, removing some files, and generally: handle a lot of errors, and add a bunch of configuration options.

This is similar to adding ssl certificates on http endpoint: it's definitely reasonable, but it's a very large surface area, and a lot of added complexity, which there is already external tools that do a lot better than we'll ever be able to.

So for advanced logging, you're better off relying on whatever tools are available on your distro, e.g. redirecting to syslog or some cloud logging (we use papertrail a lot internally). Same for ssl certs: an nginx wrapper is a much more robust and capable ssl terminator with all the bells and whistles already implemented.

@holiman holiman closed this as completed Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants