Skip to content
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

[3.2] Add information about log levels [docs] #222

Merged
merged 6 commits into from
Sep 29, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/01_nodeos/06_logging/01_logging-levels.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,43 @@ Sample `logging.json`:
]
}
```

## Expected output of log levels

* `error`
* Log output that likely requires operator intervention. Error level logging should
be reserved for conditions that are completely unexpected or otherwise needs human
heifner marked this conversation as resolved.
Show resolved Hide resolved
intervention. Currently, there are numerous `error` level logging that likely should
be `warn` as they do not require human intervention. The `net_plugin_impl`, for
example, has a number of `error` level logs for bad network connections. This is
handled and processed correctly. These should be changed to `warn` or `info`.
* `warn`
* Log output indicating unexpected but recoverable errors. Although, `warn` level
typically does not require human intervention, repeated output of `warn`
level logs may indicate action is needed by an operator. `warn` should not be used
for simply conveying information. A `warn` level log is something to take notice
of, but not necessarily be concerned about.
* `info` (default)
* Log output that provides useful information to an operator. Can just be progress
indication or other useful data to a user. Care is taken not to create excessive
log output with `info` level logging. For example, no `info` level logging should
be produced for every transaction. For progress indication, some multiple of
transactions should be processed between each log output; typically, every 1000
transactions.
* `debug`
* Useful log output for when non-default logging is enabled. Answers the question:
is this useful information for a user that is monitoring the log output. Care
should be taken to not create excessive log output; similar to `info` level
logging. `debug` level should not be used for `trace` level logging. Enabling
`debug` level logging should provide greater insight into behavior without
overwhelming the output with log entries. Like `info`, no `debug` level
logging should be produced for every transaction. There are specific
transaction level loggers dedicated to transaction level logging: `transaction`,
`transaction_trace_failure`, `transaction_trace_success`, `transaction_failure_tracing`,
`transaction_success_tracing`.
* `all` (trace)
* `all` level logging is for logging that would be overwhelming if it was `debug`
level logging. Only used in a few places and not completely supported. In the
future a different logging library may provide better trace level logging support.
The current logging framework is not performant enough to enable excess trace
level output.