canonicallog

package
v0.20.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2022 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 4 Imported by: 3

Documentation

Overview

Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/core/canonicallog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogMisbehavingPeer

func LogMisbehavingPeer(p peer.ID, peerAddr multiaddr.Multiaddr, component string, err error, msg string)

LogMisbehavingPeer is the canonical way to log a misbehaving peer. Protocols should use this to identify a misbehaving peer to allow the end user to easily identify these nodes across protocols and libp2p. Deprecated: use github.com/libp2p/go-libp2p/core/canonicallog.LogMisbehavingPeer instead

func LogMisbehavingPeerNetAddr

func LogMisbehavingPeerNetAddr(p peer.ID, peerAddr net.Addr, component string, originalErr error, msg string)

LogMisbehavingPeerNetAddr is the canonical way to log a misbehaving peer. Protocols should use this to identify a misbehaving peer to allow the end user to easily identify these nodes across protocols and libp2p. Deprecated: use github.com/libp2p/go-libp2p/core/canonicallog.LogMisbehavingPeerNetAddr instead

func LogPeerStatus added in v0.18.0

func LogPeerStatus(sampleRate int, p peer.ID, peerAddr multiaddr.Multiaddr, keyVals ...string)

LogPeerStatus logs any useful information about a peer. It takes in a sample rate and will only log one in every sampleRate messages (randomly). This is useful in surfacing events that are normal in isolation, but may be abnormal in large quantities. For example, a successful connection from an IP address is normal. 10,000 connections from that same IP address is not normal. libp2p itself does nothing besides emitting this log. Hook this up to another tool like fail2ban to action on the log. Deprecated: use github.com/libp2p/go-libp2p/core/canonicallog.LogPeerStatus instead

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL