From 5e66f6fbd88832b16c86291ff1ad93710cea7737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Thor=C3=A9n?= Date: Tue, 15 Sep 2020 14:03:53 +0800 Subject: [PATCH] Add logScope to connmanager and pubsubprotobuf (#363) --- libp2p/connmanager.nim | 3 +++ libp2p/protocols/pubsub/rpc/protobuf.nim | 3 +++ 2 files changed, 6 insertions(+) diff --git a/libp2p/connmanager.nim b/libp2p/connmanager.nim index 3e91fba..1118a4c 100644 --- a/libp2p/connmanager.nim +++ b/libp2p/connmanager.nim @@ -13,6 +13,9 @@ import peerinfo, stream/connection, muxers/muxer +logScope: + topics = "connmanager" + declareGauge(libp2p_peers, "total connected peers") const MaxConnectionsPerPeer = 5 diff --git a/libp2p/protocols/pubsub/rpc/protobuf.nim b/libp2p/protocols/pubsub/rpc/protobuf.nim index ab6fcc7..8c94e10 100644 --- a/libp2p/protocols/pubsub/rpc/protobuf.nim +++ b/libp2p/protocols/pubsub/rpc/protobuf.nim @@ -14,6 +14,9 @@ import messages, ../../../utility, ../../../protobuf/minprotobuf +logScope: + topics = "pubsubprotobuf" + proc write*(pb: var ProtoBuffer, field: int, graft: ControlGraft) = var ipb = initProtoBuffer() ipb.write(1, graft.topicID)