ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
15.92k stars 2.98k forks source link

Documentation for log levels #7808

Open xuhcc opened 3 years ago

xuhcc commented 3 years ago

Location

https://github.com/ipfs/go-ipfs/blob/master/docs/environment-variables.md#ipfs_logging

Description

The document says that logging level for IPFS_LOGGING variable should be one of CRITICAL ERROR WARNING NOTICE INFO DEBUG. ipfs log --help says that supported levels are debug, info, warn, error, dpanic, panic, fatal.

But it seems that none of these is working with IPFS_LOGGING (the output is not affected).

Also, the GitHub issue template and readme point to https://github.com/ipfs/docs which is archived:

Problems with documentation on https://docs.ipfs.io should be reported to https://github.com/ipfs/docs
welcome[bot] commented 3 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

aschmahmann commented 3 years ago

@xuhcc thanks for the heads up on the Github template, btw the repo is now ipfs/ipfs-docs as noted in the archived ipfs/docs repo.

But it seems that none of these is working with IPFS_LOGGING (the output is not affected).

Can you give more information, i.e. the recommendation in the bug report template of ipfs version --all?

Running the below commands gives me tons of log output in the terminal the daemon is running in.

export IPFS_LOGGING=DEBUG
ipfs daemon
xuhcc commented 3 years ago

go-ipfs version:

$ ipfs version --all
go-ipfs version: 0.7.0-ea77213e3
Repo version: 10
System version: amd64/linux
Golang version: go1.15.2

Logger output:

$ IPFS_LOGGING=CRITICAL ipfs log tail
error setting log levels: unrecognized level: "CRITICAL"
...(lots of seemingly low-level log records)...

$ IPFS_LOGGING=fatal ipfs log tail
...(also lots of low-level log records but no unrecognized level error)...
xuhcc commented 3 years ago

I see, IPFS_LOGGING=fatal works with ipfs daemon. So ipfs log tail is some other kind of log.

aschmahmann commented 3 years ago

Yes ipfs log tail is a different kind of log then the one emitted by ipfs daemon. From the docs:

> ipfs log tail --help
USAGE
  ipfs log tail - Read the event log.

SYNOPSIS
  ipfs log tail

DESCRIPTION

  Outputs event log messages (not other log messages) as they are generated.

It seems like this issue is resolved if any bugs show up feel free to reopen or post a new issue. Additionally, for support you can go to discuss.ipfs.io or to the Matrix/IRC channels.

btw issue template bug fixed by #7809.

xuhcc commented 3 years ago

This issue is about documentation which is still not updated.

aschmahmann commented 3 years ago

Ah, I see the issue is the mismatch between the doc and help function with one having CRITICAL WARNING NOTICE and the other warn, dpanic, panic, fatal.