ipfs / ipfs/kubo

daemon logs requests

Open
#5,795 2 comments 2 reactions 0 assignees View on GitHub
kind/enhancement
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

#### Version information:
I'm running docker image `ipfs/go-ipfs:latest` aka
```
$ ipfs version --all
go-ipfs version: 0.4.18-6f19dd5
Repo version: 7
System version: amd64/linux
Golang version: go1.11.1
```

#### Type:
Feature (+ related bug)

#### Description:

I'm preparing to administer an IPFS node & am having trouble with logs. The logs that I'm interested in are: Timestamp, HTTP endpoint, result, latency. The goal is to monitor the interactions this IPFS node has with it's clients. For example, something like this would be awesome:

```
181124T06:58:22Z api/v0/add - success in 123 ms
181124T06:59:22Z api/v0/pin - failure: forbidden 403 in 23 ms
```

Looks like the current system does not provide any option to start the daemon in a way that provides useful logs like this & would be overjoyed if a feature was added that provided this functionality.

Seems like my current options are:

According to `ipfs daemon --help` and `ipfs help`, I don't have any options. Some options *are* available though & I'd prefer to be able to discover them via this help interface.

I discovered `ipfs daemon --verbose` from issue #1816 which has a signal-to-noise ratio of almost 0

The same issue also introduced `ipfs log level` which I'm trying to use like so:

```
ipfs log level all critical # I expect this to turn off all logs besides critical ones
ipfs log level eventlog info # I expect this to only turn on logs for the "eventlog" module
ipfs log tail # I expect this to print logs according to my log level changes above
```

But the above set of commands seems to ignore the log level updates & just print out everything. For example, most of the logs that are printed include stuff like `"system":"dht"` and `"system":"addrutil"` which suggests that logs other than those from the eventlog system are being printed. This may be a bug or potentially a misunderstanding on my end.

I also don't know if "eventlog" is the system that contains the logs I want. "cmds/http" Also sounds promising but I don't know where the documentation is that would explain this, any guidance would be greatly appreciated.

IPFS is going to change the world, thank you for all the work you've put into this project 😁

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.