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

feat(cli): disable persistent logs #2263

Merged
merged 3 commits into from
Apr 16, 2023
Merged

feat(cli): disable persistent logs #2263

merged 3 commits into from
Apr 16, 2023

Conversation

rkrasiuk
Copy link
Member

@rkrasiuk rkrasiuk commented Apr 15, 2023

Currently, our logs are really verbose and the log file grows very fast. My machine ran out of disk space during full sync due to the log file growing to 777gb.

Change default behavior to disabled persistent logs. Add an option to enable persistent logs.

This is a temporary solution to a log file size problem. Ideally, we want to have a size limit at which the older logs would be flushed.

@rkrasiuk rkrasiuk added C-enhancement New feature or request A-cli Related to the reth CLI labels Apr 15, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2023

Codecov Report

Merging #2263 (2fa4fb1) into main (0b9621c) will increase coverage by 1.78%.
The diff coverage is 0.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #2263      +/-   ##
==========================================
+ Coverage   70.24%   72.03%   +1.78%     
==========================================
  Files         472      472              
  Lines       56738    56742       +4     
==========================================
+ Hits        39858    40876    +1018     
+ Misses      16880    15866    -1014     
Flag Coverage Δ
integration-tests 18.38% <0.00%> (+3.47%) ⬆️
unit-tests 67.07% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bin/reth/src/cli.rs 16.66% <0.00%> (-1.91%) ⬇️

... and 84 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rkrasiuk rkrasiuk changed the title feat(cli): disable persistent lgos feat(cli): disable persistent logs Apr 15, 2023
Comment on lines 124 to 126
/// The flag to disable persistent logs.
#[arg(long = "log.disable-persistent", global = true, conflicts_with = "log_directory")]
disable_persistent: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this enabled by default?
I didn't even know this was a thing

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk, don't mind making it disabled by default. the only reason i knew about this is because i kept running out of disk space

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, didn't attribute it at first to gigantic logs.

I'm for making this opt in.

@rkrasiuk rkrasiuk requested a review from mattsse April 15, 2023 11:15
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would like to get @onbjerg and @gakonst opinion on this

bin/reth/src/cli.rs Outdated Show resolved Hide resolved
@gakonst gakonst merged commit 8b4a73d into main Apr 16, 2023
@gakonst gakonst deleted the rkrasiuk/disable-log-file branch April 16, 2023 03:16
@gakonst
Copy link
Member

gakonst commented Apr 16, 2023

Need this to unblock debugging at the tip. I think we'll revamp our logging from first principles as right now our logs are less useful for end users and more for our own internal debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants