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

docs(logging): environment variables with per-subsystem details #8833

Merged
merged 2 commits into from
Apr 6, 2022
Merged
Changes from 1 commit
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
39 changes: 27 additions & 12 deletions docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,9 @@ Default: ~/.ipfs

## `IPFS_LOGGING`

Sets the log level for go-ipfs. It can be set to one of:
Specifies the log level for go-ipfs.

* `CRITICAL`
* `ERROR`
* `WARNING`
* `NOTICE`
* `INFO`
* `DEBUG`

Logging can also be configured (on a subsystem by subsystem basis) at runtime
with the `ipfs log` command.

Default: `ERROR`
`IPFS_LOGGING` is a deprecated alias for the `GOLOG_LOG_LEVEL` environment variable. See below.

## `IPFS_LOGGING_FMT`

Expand All @@ -40,6 +30,31 @@ Sets the log message format. Can be one of:

Default: `color`

## `GOLOG_LOG_LEVEL`

Specifies the log-level, both globally and on a per-subsystem basis. Level can be one of:

* `debug`
lidel marked this conversation as resolved.
Show resolved Hide resolved
* `info`
* `warn`
* `error`
* `dpanic`
* `panic`
* `fatal`

Per-subsystem levels can be specified with `subsystem=level`. One global level and one or more per-subsystem levels
can be specified by separating them with commas.

Default: `error`

Example:

```console
GOLOG_LOG_LEVEL="error,core/server=debug" ipfs daemon
```

Logging can also be configured at runtime, both globally and on a per-subsystem basis, with the `ipfs log` command.

## `GOLOG_FILE`

Sets the file to which go-ipfs logs. By default, go-ipfs logs to standard error.
Expand Down