cmd/geth: enable log rotation (#26843)

This change enables log rotation, which can be activated using the flag --log.rotate. Additional parameters that can be given are: 

  - log.maxsize to set maximum size before files are rotated,
  - log.maxbackups to set how many files are retailed, 
  - log.maxage to configure max age of rotated files, 
  - log.compress whether to compress rotated files

The way to configure location of the logfile(s) is left unchanged, via the `log.logfile` parameter.  

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
sudeep
2023-04-03 05:05:36 -04:00
committed by GitHub
co-authored by Martin Holst Swende
parent 2c5798464e
commit 7076ae00aa
4 changed files with 117 additions and 33 deletions
+1
View File
@@ -47,3 +47,4 @@ profile.cov
/dashboard/assets/package-lock.json
**/yarn-error.log
logs/