1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00

4 Commits

Author SHA1 Message Date
255fefb2aa feat(peerlog): log protocols/versions 2020-03-10 09:33:11 -07:00
aa3ca14197 feat: pass IPFS_PLUGINS to docker build
- allow IPFS_PLUGINS build-arg to be passed to docker build command
- remove annoying logging from peerlog plugin that appears multiple times in docker logs

usage:

  docker build --build-arg IPFS_PLUGINS="foo bar baz"

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
2020-02-13 14:39:58 +00:00
15085fd1a3 fix(plugin): check log error 2020-02-10 13:09:00 -08:00
edfe9c5efd feat: add peerlog plugin
adds a plugin to log just peerIDs for nodes we connect to, to allow us to see how many unique peers a node connects to over time.

It's set up a preloaded plugin, so it would be enabled by default. We may want to extract it to a seperate repo so we can make it an optional add on.

**Usage**

```console
$ GOLOG_FILE=~/peer.log IPFS_LOGGING_FMT=json ipfs daemon
```

**output**

```json
{"level":"info","ts":"2020-02-10T13:54:26.639Z","logger":"plugin/peerlog","caller":"peerlog/peerlog.go:51","msg":"connected","peer":"QmS2H72gdrekXJggGdE9SunXPntBqdkJdkXQJjuxcH8Cbt"}
{"level":"info","ts":"2020-02-10T13:54:59.095Z","logger":"plugin/peerlog","caller":"peerlog/peerlog.go:56","msg":"disconnected","peer":"QmS2H72gdrekXJggGdE9SunXPntBqdkJdkXQJjuxcH8Cbt"}
```

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
2020-02-10 14:05:16 +00:00