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
Dev Tools: Integrate Logfile Navigator (lnav) #5000
Conversation
…ages and not formatted properly
Codecov Report
@@ Coverage Diff @@
## master #5000 +/- ##
==========================================
- Coverage 53.65% 51.71% -1.95%
==========================================
Files 432 432
Lines 54058 54058
==========================================
- Hits 29007 27958 -1049
- Misses 22805 23783 +978
- Partials 2246 2317 +71
... and 103 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to see the logging started, telemetry enabled vs disabled, GUID/Session information show up in node.log, with some structure show up node.log, rather than remove it altogether
scripts/algorand_node_log.json
Outdated
"title" : "Algornad Node Log Format", | ||
"description" : "Log format for logrus, used by go-algorand.", | ||
"url" : "https://github.com/sirupsen/logrus", | ||
"file-pattern": "node.log", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node archive is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file-pattern
is used to avoid potential conflicts when lnav
chooses the file format to use.
I've replaced it with sample
which defines some log line samples and uses them for conflict resolution instead (seems like this is the more common approach).
5f7e447
to
76af5ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am in favor of making the log entirely one object format.
Co-authored-by: Hang Su <87964331+ahangsu@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me second an approval, for it helps in reading the logs
I'd prefer to see a some kind of lnav header as Chris suggested as well but LGTM |
s.log.Infoln("++++++++++++++++++++++++++++++++++++++++") | ||
s.log.Infoln("Logging Starting") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird to print "Logging Started" in the log file.
Some better options:
- Write "Logging Started: " to stdout.
- Delete these lines.
Either way, definitely remove the ++++++++++++++++++++++++++++++++++++++++
banner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+++ATH0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm restarting a container, and tailing logs, it is helpful to see a clear location where the restart is obvious. But that said, it shouldn't deviate from the normal formatting expected by machine parsers, e.g. Filebeat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, "algod process start"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+++ATH0
Is this https://support.usr.com/support/3cxm756/3cxm756-ug/atcoms.htm ?
Usage:
./scripts/configure_dev.sh
lnav node.log