adding libp2p tag to logScope (#465)

This commit is contained in:
Dmitriy Ryajov 2020-12-01 11:34:27 -06:00 committed by GitHub
parent e1648d4404
commit d1c689e5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 24 additions and 21 deletions

View File

@ -15,7 +15,7 @@ import peerinfo,
errors
logScope:
topics = "connmanager"
topics = "libp2p connmanager"
declareGauge(libp2p_peers, "total connected peers")

View File

@ -14,7 +14,7 @@ import stream/connection,
protocols/protocol
logScope:
topics = "multistream"
topics = "libp2p multistream"
const
MsgSize* = 64*1024

View File

@ -15,7 +15,7 @@ import ../../stream/connection,
../../vbuffer
logScope:
topics = "mplexcoder"
topics = "libp2p mplexcoder"
type
MessageType* {.pure.} = enum

View File

@ -18,7 +18,7 @@ import ./coder,
export connection
logScope:
topics = "mplexchannel"
topics = "libp2p mplexchannel"
## Channel half-closed states
##

View File

@ -20,7 +20,7 @@ import ../muxer,
export muxer
logScope:
topics = "mplex"
topics = "libp2p mplex"
const MplexCodec* = "/mplex/6.7.0"

View File

@ -13,7 +13,7 @@ import ../protocols/protocol,
../errors
logScope:
topics = "muxer"
topics = "libp2p muxer"
const
DefaultChanTimeout* = 5.minutes

View File

@ -19,7 +19,7 @@ import ../protobuf/minprotobuf,
../utility
logScope:
topics = "identify"
topics = "libp2p identify"
const
IdentifyCodec* = "/ipfs/id/1.0.0"

View File

@ -20,7 +20,7 @@ import ./pubsub,
../../utility
logScope:
topics = "floodsub"
topics = "libp2p floodsub"
const FloodSubCodec* = "/floodsub/1.0.0"

View File

@ -25,7 +25,7 @@ import stew/results
export results
logScope:
topics = "gossipsub"
topics = "libp2p gossipsub"
const
GossipSubCodec* = "/meshsub/1.1.0"

View File

@ -28,7 +28,7 @@ import ./pubsub,
../../utility
logScope:
topics = "gossipsub"
topics = "libp2p gossipsub"
const GossipSubCodec* = "/meshsub/1.0.0"

View File

@ -27,7 +27,7 @@ export PubSubObserver
export protocol
logScope:
topics = "pubsub"
topics = "libp2p pubsub"
declareGauge(libp2p_pubsub_peers, "pubsub peer instances")
declareGauge(libp2p_pubsub_topics, "pubsub subscribed topics")

View File

@ -20,7 +20,7 @@ import rpc/[messages, message, protobuf],
export peerid, connection
logScope:
topics = "pubsubpeer"
topics = "libp2p pubsubpeer"
when defined(libp2p_expensive_metrics):
declareCounter(libp2p_pubsub_sent_messages, "number of messages sent", labels = ["id", "topic"])

View File

@ -25,7 +25,7 @@ when defined(libp2p_dump):
import ../../debugutils
logScope:
topics = "noise"
topics = "libp2p noise"
const
# https://godoc.org/github.com/libp2p/go-libp2p-noise#pkg-constants

View File

@ -20,7 +20,7 @@ import secure,
export hmac, sha2, sha, hash, rijndael, bcmode
logScope:
topics = "secio"
topics = "libp2p secio"
const
SecioCodec* = "/secio/1.0.0"

View File

@ -19,7 +19,7 @@ import ../protocol,
export protocol
logScope:
topics = "secure"
topics = "libp2p secure"
const
SecureConnTrackerName* = "SecureConn"

View File

@ -19,7 +19,7 @@ when chronicles.enabledLogLevel == LogLevel.TRACE:
export connection
logScope:
topics = "bufferstream"
topics = "libp2p bufferstream"
const
BufferStreamTrackerName* = "BufferStream"

View File

@ -12,7 +12,7 @@ import chronos, chronicles
import connection
logScope:
topics = "chronosstream"
topics = "libp2p chronosstream"
const
DefaultChronosStreamTimeout = 10.minutes

View File

@ -16,7 +16,7 @@ import lpstream,
export lpstream, peerinfo
logScope:
topics = "connection"
topics = "libp2p connection"
const
ConnectionTrackerName* = "Connection"

View File

@ -21,7 +21,7 @@ declareGauge(libp2p_open_streams,
export oids
logScope:
topics = "lpstream"
topics = "libp2p lpstream"
const
LPStreamTrackerName* = "LPStream"

View File

@ -33,7 +33,7 @@ import stream/connection,
export connmanager
logScope:
topics = "switch"
topics = "libp2p switch"
#TODO: General note - use a finite state machine to manage the different
# steps of connections establishing and upgrading. This makes everything

View File

@ -18,7 +18,7 @@ import transport,
../stream/chronosstream
logScope:
topics = "tcptransport"
topics = "libp2p tcptransport"
export transport

View File

@ -14,6 +14,9 @@ import ../stream/connection,
../multiaddress,
../multicodec
logScope:
topics = "libp2p transport"
type
TransportClosedError* = object of CatchableError