Skip to content

Commit

Permalink
docs: environment-variables.md
Browse files Browse the repository at this point in the history
Document IPFS_LOGGING deprecation as alias to GOLOG_LOG_LEVEL and expand doc to include per-subsystem log levels.
  • Loading branch information
Justin Johnson committed Mar 30, 2022
1 parent 46c3689 commit f2f2587
Showing 1 changed file with 27 additions and 12 deletions.
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`
* `info`
* `warn`
* `error`
* `dpanic`
* `panic`
* `fatal`

Per-subsystem levels are 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

0 comments on commit f2f2587

Please sign in to comment.