Browse Source

docs: logger updates (#6545)

## Description

Update for logging changes
pull/6550/head
Marko 3 years ago
committed by GitHub
parent
commit
7cc32f3f0f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 15 deletions
  1. +1
    -1
      docs/nodes/configuration.md
  2. +4
    -11
      docs/nodes/logging.md
  3. +2
    -2
      docs/nodes/running-in-production.md
  4. +1
    -1
      test/e2e/pkg/manifest.go

+ 1
- 1
docs/nodes/configuration.md View File

@ -78,7 +78,7 @@ db-backend = "goleveldb"
db-dir = "data"
# Output level for logging, including package level options
log-level = "main:info,state:info,statesync:info,*:error"
log-level = "info"
# Output format: 'plain' (colored text) or 'json'
log-format = "plain"


+ 4
- 11
docs/nodes/logging.md View File

@ -4,33 +4,27 @@ order: 7
## Logging
Logging adds detail and allows the node operator to better identify what they are looking for. Tendermint supports log levels on a global and per-module basis. This allows the node operator to see only the information they need and the developer to hone in on specific changes they are working on.
Logging adds detail and allows the node operator to better identify what they are looking for. Tendermint supports log levels on a global and per-module basis. This allows the node operator to see only the information they need and the developer to hone in on specific changes they are working on.
## Configuring Log Levels
There are three log levels, `info`, `debug` and `error`. These can be configured either through the command line via `tendermint start --log-level ""` or within the `config.toml` file.
- `info` Info represents an informational message. It is used to show that modules have started, stopped and how they are functioning.
- `debug` Debug is used to trace various calls or problems. Debug is used widely throughout a codebase and can lead to overly verbose logging.
- `error` Error represents something that has gone wrong. An error log can represent a potential problem that can lead to a node halt.
The default setting is a global `main:info,state:info,statesync:info,*:error` level. If you would like to set the log level for a specific module, it can be done in the following format:
> We are setting all modules to log level `info` and the mempool to `error`. This will log all errors within the mempool module.
- `error` Error represents something that has gone wrong. An error log can represent a potential problem that can lead to a node halt.
Within the `config.toml`:
```toml
# Output level for logging, including package level options
log-level = "*:info,mempool:error"
log-level = "info"
```
Via the command line:
```sh
tendermint start --log-level "*:info,mempool:error"
tendermint start --log-level "info"
```
## List of modules
@ -63,7 +57,6 @@ little overview what they do.
executes blocks against the application.
- `statesync` Provides a way to quickly sync a node with pruned history.
### Walkabout example
We first create three connections (mempool, consensus and query) to the


+ 2
- 2
docs/nodes/running-in-production.md View File

@ -36,14 +36,14 @@ Applications can use [state sync](state-sync.md) to help nodes bootstrap quickly
## Logging
Default logging level (`log-level = "main:info,state:info,statesync:info,*:error"`) should suffice for
Default logging level (`log-level = "info"`) should suffice for
normal operation mode. Read [this
post](https://blog.cosmos.network/one-of-the-exciting-new-features-in-0-10-0-release-is-smart-log-level-flag-e2506b4ab756)
for details on how to configure `log-level` config variable. Some of the
modules can be found [here](../nodes/logging#list-of-modules). If
you're trying to debug Tendermint or asked to provide logs with debug
logging level, you can do so by running Tendermint with
`--log-level="*:debug"`.
`--log-level="debug"`.
### Consensus WAL


+ 1
- 1
test/e2e/pkg/manifest.go View File

@ -136,7 +136,7 @@ type ManifestNode struct {
// restart: restarts the node, shutting it down with SIGTERM
Perturb []string `toml:"perturb"`
// Log level sets the log level of the specific node i.e. "consensus:info,*:error".
// Log level sets the log level of the specific node i.e. "info".
// This is helpful when debugging a specific problem. This overrides the network
// level.
LogLevel string `toml:"log_level"`


Loading…
Cancel
Save