Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

cmd/geth: implement interval-based status logging #324

Merged
merged 21 commits into from
Aug 16, 2017

Commits on Jul 27, 2017

  1. sketches for using API for logging... may be overkill

    may be worth thinking about more flexible and beautiful
    ways to display information... 'monitor', 'attach', etc,
    along with termui, graphs...
    
    output can be 'machiney'-- line-by-line,
    or human-y -- pictures of buffalo and whatnot.
    whilei committed Jul 27, 2017
    Configuration menu
    Copy the full SHA
    8effd93 View commit details
    Browse the repository at this point in the history
  2. 💾

    whilei committed Jul 27, 2017
    Configuration menu
    Copy the full SHA
    7abe6ca View commit details
    Browse the repository at this point in the history
  3. WIP: problem: should implement interval-based status logging

    solution: use a go func connected to the node's Ethereum to grab and calculate relevant logs
    
    rel ethereumproject#127
    rel ethereumproject#318
    
    ---
    
    TODO: fix or remove:
    - downloading-from peers, eg 'this var/x/x peers'
    - shows mode 'FullSync' before downloader initializes, even if it will be 'FastSync'
    whilei committed Jul 27, 2017
    Configuration menu
    Copy the full SHA
    a360b1c View commit details
    Browse the repository at this point in the history
  4. problem: no reason to force RPC

    solution: comment code and include small explanation
    whilei committed Jul 27, 2017
    Configuration menu
    Copy the full SHA
    8323600 View commit details
    Browse the repository at this point in the history
  5. problem: no reason to return eth from StartNode

    solution: remove exploratory code that is not useless
    whilei committed Jul 27, 2017
    Configuration menu
    Copy the full SHA
    0fd6e5f View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2017

  1. problem: warning log should use logger.Warn

    solution: move to Warn from Error
    whilei committed Jul 28, 2017
    Configuration menu
    Copy the full SHA
    80f7222 View commit details
    Browse the repository at this point in the history
  2. problem: log-pace flag usage antiquated

    solution: update it and simplify
    whilei committed Jul 28, 2017
    Configuration menu
    Copy the full SHA
    6f530fe View commit details
    Browse the repository at this point in the history
  3. problem: should polish log-pace function

    solution:
    - remove dead code, old notes
    - remove units from --log-pace= argument, just use seconds as value (simpler is better)
    - if mining, show STATUS MINE with minerthreads and hashrate (TODO: more?)
    - gofmt
    
    Rel ethereumproject#127, ethereumproject#318
    whilei committed Jul 28, 2017
    Configuration menu
    Copy the full SHA
    0361214 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2017

  1. problem: minor variable renaming and comments

    solution: improve legibility
    whilei committed Jul 29, 2017
    Configuration menu
    Copy the full SHA
    cdafd37 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2017

  1. problem: logging genesis account balances on Core log-level is too high

    solution: relegate to debug
    whilei committed Jul 30, 2017
    Configuration menu
    Copy the full SHA
    5e5f52c View commit details
    Browse the repository at this point in the history
  2. problem: can share interrupt chan

    solution: share chan in main between shutdown and closing status log goroutine
    whilei committed Jul 30, 2017
    Configuration menu
    Copy the full SHA
    2990308 View commit details
    Browse the repository at this point in the history
  3. problem: logging to dir should also output to stderr

    solution: implement and glog SetAlsoToStdErr exported function and use in case of --log-dir
    whilei committed Jul 30, 2017
    Configuration menu
    Copy the full SHA
    861d49b View commit details
    Browse the repository at this point in the history
  4. problem: log io flush never called after interrupt

    results in missing any logs after shutdown processes in FS logs
    
    solution: defer log Flush after shutdown services
    
    also decrease flushInterval from 30 -> 5 seconds (rate at which log buffer is written to FS)
    whilei committed Jul 30, 2017
    Configuration menu
    Copy the full SHA
    05dca17 View commit details
    Browse the repository at this point in the history
  5. problem: rename '--log-pace' to '--log-status'

    solution: rename flag and flagvar and status log function
    
    also adds logstatus flag to correct category for usage output
    whilei committed Jul 30, 2017
    Configuration menu
    Copy the full SHA
    027a8d0 View commit details
    Browse the repository at this point in the history
  6. problem: want --log-status to be extensible for other interfaces

    solution: refactor to use '--log-status='sync=60'' syntax, which can eventually support other features besides 'sync',
    eg. mine, net, disk
    whilei committed Jul 30, 2017
    Configuration menu
    Copy the full SHA
    a06f511 View commit details
    Browse the repository at this point in the history
  7. problem: (nonfunctional,refactor) should move cmd-oriented functions …

    …to cmd.go
    
    solution: cut and paste and update imports
    whilei committed Jul 30, 2017
    Configuration menu
    Copy the full SHA
    492c7ca View commit details
    Browse the repository at this point in the history
  8. solution: run gofmt

    whilei committed Jul 30, 2017
    Configuration menu
    Copy the full SHA
    a117f2f View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2017

  1. problem: rollback command logging confirmation should check fastblock

    solution: error if neither fastblock nor fullblock match desired head number
    
    fixes ethereumproject#325
    whilei committed Jul 31, 2017
    Configuration menu
    Copy the full SHA
    af4d7e4 View commit details
    Browse the repository at this point in the history
  2. problem: interrupt shutdown processes not consistent

    solution: don't share os-interrupt channel as a global.
    Notify library documentation clearly says Notify events can be called
    multiple times and notification will be copied, so there's no harm in
    listening for the same event on mutliple channels.
    
    This pattern avoids a global and encourages per-feature handling of
    shutdown scenarios.
    whilei committed Jul 31, 2017
    Configuration menu
    Copy the full SHA
    5be13af View commit details
    Browse the repository at this point in the history
  3. problem: (log syntax) log-status interval initial log still shows 'lo…

    …g-pace' wording
    
    solution: fix
    whilei committed Jul 31, 2017
    Configuration menu
    Copy the full SHA
    82ea60b View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2017

  1. Configuration menu
    Copy the full SHA
    4aed4f2 View commit details
    Browse the repository at this point in the history