diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 174e283f9fc9..42ce4e2558b3 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -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` @@ -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.