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

[WIP]: standardize peer discovery log syntax #326

Closed
wants to merge 19 commits into from

Conversation

whilei
Copy link
Contributor

@whilei whilei commented Jul 31, 2017

Rel #317

Purpose: improve human- and machine-readability for peer discovery logs.

This brings into consideration defining/+establishing a standard log pattern for event-based logs across all log-levels and various "zones" (eg. peer discovery, blockchain, miner, ...).

Note: this PR/branch is currently based on (and thus includes changes from) #324. Unique changes begin with 7ddeb4f.

whilei added 19 commits July 27, 2017 17:52
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.
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'
solution: comment code and include small explanation
solution: remove exploratory code that is not useless
solution: move to Warn from Error
solution: update it and simplify
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
solution: share chan in main between shutdown and closing status log goroutine
solution: implement and glog SetAlsoToStdErr exported function and use in case of --log-dir
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)
solution: rename flag and flagvar and status log function

also adds logstatus flag to correct category for usage output
solution: refactor to use '--log-status='sync=60'' syntax, which can eventually support other features besides 'sync',
eg. mine, net, disk
…to cmd.go

solution: cut and paste and update imports
solution: error if neither fastblock nor fullblock match desired head number

fixes ethereumproject#325
…achine readability

solution: WIP implement sketch for standardized log format
for peer discovery uses, which format can be extended to other modules as well

rel ethereumproject#317
@whilei whilei changed the title [WIP]: standardize peer discover log syntax [WIP]: standardize peer discovery log syntax Jul 31, 2017
@whilei
Copy link
Contributor Author

whilei commented Aug 1, 2017

Replacing with #327.

@whilei whilei closed this Aug 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant