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

On-disk logging facility #2671

Closed
2 tasks
gsora opened this issue Nov 2, 2023 · 1 comment
Closed
2 tasks

On-disk logging facility #2671

gsora opened this issue Nov 2, 2023 · 1 comment
Labels
protocol Protocol Team tickets

Comments

@gsora
Copy link
Collaborator

gsora commented Nov 2, 2023

🎯 Problem to be solved

Charon has been designed from the beginning with a no-disk-write approach: aside for the DKG and create cluster, Charon never writes anything on disk.

The container-exclusive deployment strategy leaves the burden of log retention to the user: since on container restart logs are lost, the user needs to devise a plan to persist them somewhere in order to audit and eventually find and report bugs to us.

🛠️ Proposed solution

  • Approved design doc: link
  • Core team consensus on the proposed solution

I propose we consider the implementation of a on-disk log retention strategy, where Charon writes logs on the already existing facilities (Loki, stdout) as well as files - plural here because log files need to be periodically rotated.

Zap provides multiple ways of configuring custom logging outputs, and they document a way of automating log rotation and compression from within the codebase itself: https://github.com/uber-go/zap/blob/master/FAQ.md#usage.

@github-actions github-actions bot added the protocol Protocol Team tickets label Nov 2, 2023
@corverroos
Copy link
Contributor

A simple solution would be to add optional logging driver config to cdvn repo. Either manually to each compose service or globally as docker default logging driver. A good option is journald which has log rotation built in.

obol-bulldozer bot pushed a commit that referenced this issue Nov 28, 2023
Write debug logs on disk if `--log-output-path` is specified.

Log files are rotated automatically once the file size reaches 50MB.

Rotated log files will be kept for 7 days - max 10 rotated files will be kept, whatever comes first.

category: feature
ticket: #2671
@gsora gsora closed this as completed Dec 6, 2023
xenowits pushed a commit that referenced this issue Dec 12, 2023
Write debug logs on disk if `--log-output-path` is specified.

Log files are rotated automatically once the file size reaches 50MB.

Rotated log files will be kept for 7 days - max 10 rotated files will be kept, whatever comes first.

category: feature
ticket: #2671
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol Protocol Team tickets
Projects
None yet
Development

No branches or pull requests

2 participants