Chia-Network / chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
10.82k stars 2.03k forks source link

Log files need auto cleanup #4864

Closed ByronAP closed 3 years ago

ByronAP commented 3 years ago

Plotting leaves a slew of logs which should be removed on a regular basis (delete plot logs older than N hours) and it seems that the other logs should have a size limit option (purge entries to keep size < limit or max N days).

baizuchong-net commented 3 years ago

赞成

sargonas commented 3 years ago

By default, one log file is created for each plot, with detailed logging for the process. This is done for a variety of reasons, but most ideally because it allows for the multitude of community plotting tools out there to interact with the current plot state.

For a large number of people, they like to keep these files around to run calculations on efficiency for their plotting methods. That being said, you do bring up a good point that for people who have no interest in doing this, it does create a slew of logs they have to clean up manually and regularly. Not the end of the world but the ability to do so would be a nice quality of life feature.

There is an existing request issue #3238 that discusses adding a less verbose option to plot logging, so perhaps there is a conversation to be had about potentially adding automatic cleanup/rotation as well to that idea.

as1543100166 commented 3 years ago

Where can I find the plotting log,I can't even find this

sargonas commented 3 years ago

I've always used a custom location, so I am a bit rusty on what the default is for sure but I'm fairly certain it is in ~/.chia/mainnet/plotter/ on Ubuntu and C:\users\USERNAME.chia\mainnet\plotter\ on Windows.

github-actions[bot] commented 3 years ago

This issue has been flagged as stale as there has been no activity on it in 14 days. If this issue is still affecting you and in need of review, please update it to keep it open.

github-actions[bot] commented 3 years ago

This issue was automatically closed because it has been flagged as stale and subsequently passed 7 days with no further activity.