Skip to content

Commit 7e5041d

Browse files
Move log level from debug to info (#3622)
* convert all debug logs to info log level * waku_relay protocol mv notice spammy logs to debug
1 parent 7e3617c commit 7e5041d

File tree

88 files changed

+505
-505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+505
-505
lines changed

apps/benchmarks/benchmarks.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ proc benchmark(
2424
except Exception, CatchableError:
2525
assert false, "exception raised: " & getCurrentExceptionMsg()
2626

27-
debug "registration finished",
27+
info "registration finished",
2828
iter = i, elapsed_ms = (getTime() - start_time).inMilliseconds
2929

3030
discard await manager.updateRoots()
@@ -33,7 +33,7 @@ proc benchmark(
3333
quit(QuitFailure)
3434

3535
let epoch = default(Epoch)
36-
debug "epoch in bytes", epochHex = epoch.inHex()
36+
info "epoch in bytes", epochHex = epoch.inHex()
3737
let data: seq[byte] = newSeq[byte](1024)
3838

3939
var proofGenTimes: seq[times.Duration] = @[]
@@ -50,7 +50,7 @@ proc benchmark(
5050
let ok = manager.verifyProof(data, proof).valueOr:
5151
raiseAssert $error
5252
proofVerTimes.add(getTime() - verify_time)
53-
debug "iteration finished",
53+
info "iteration finished",
5454
iter = i, elapsed_ms = (getTime() - start_time).inMilliseconds
5555

5656
echo "Proof generation times: ", sum(proofGenTimes) div len(proofGenTimes)

apps/chat2/chat2.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ proc publish(c: Chat, line: string) =
194194
# for future version when we support more than one rln protected content topic,
195195
# we should check the message content topic as well
196196
if c.node.wakuRlnRelay.appendRLNProof(message, float64(time)).isErr():
197-
debug "could not append rate limit proof to the message"
197+
info "could not append rate limit proof to the message"
198198
else:
199-
debug "rate limit proof is appended to the message"
199+
info "rate limit proof is appended to the message"
200200
let proof = RateLimitProof.init(message.proof).valueOr:
201201
error "could not decode the RLN proof"
202202
return
@@ -406,7 +406,7 @@ proc processInput(rfd: AsyncFD, rng: ref HmacDrbgContext) {.async.} =
406406
)
407407
elif conf.dnsDiscoveryUrl != "":
408408
# No pre-selected fleet. Discover nodes via DNS using user config
409-
debug "Discovering nodes using Waku DNS discovery", url = conf.dnsDiscoveryUrl
409+
info "Discovering nodes using Waku DNS discovery", url = conf.dnsDiscoveryUrl
410410
dnsDiscoveryUrl = some(conf.dnsDiscoveryUrl)
411411

412412
var discoveredNodes: seq[RemotePeerInfo]
@@ -528,7 +528,7 @@ proc processInput(rfd: AsyncFD, rng: ref HmacDrbgContext) {.async.} =
528528
info "WakuRLNRelay is enabled"
529529

530530
proc spamHandler(wakuMessage: WakuMessage) {.gcsafe, closure.} =
531-
debug "spam handler is called"
531+
info "spam handler is called"
532532
let chatLineResult = getChatLine(wakuMessage.payload)
533533
echo "spam message is found and discarded : " & chatLineResult
534534
chat.prompt = false

apps/chat2bridge/chat2bridge.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ proc start*(cmb: Chat2MatterBridge) {.async.} =
197197

198198
cmb.running = true
199199

200-
debug "Start polling Matterbridge"
200+
info "Start polling Matterbridge"
201201

202202
# Start Matterbridge polling (@TODO: use streaming interface)
203203
proc mbHandler(jsonNode: JsonNode) {.async.} =
@@ -207,7 +207,7 @@ proc start*(cmb: Chat2MatterBridge) {.async.} =
207207
asyncSpawn cmb.pollMatterbridge(mbHandler)
208208

209209
# Start Waku v2 node
210-
debug "Start listening on Waku v2"
210+
info "Start listening on Waku v2"
211211
await cmb.nodev2.start()
212212

213213
# Always mount relay for bridge

apps/chat2mix/chat2mix.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ proc processInput(rfd: AsyncFD, rng: ref HmacDrbgContext) {.async.} =
501501
)
502502
elif conf.dnsDiscoveryUrl != "":
503503
# No pre-selected fleet. Discover nodes via DNS using user config
504-
debug "Discovering nodes using Waku DNS discovery", url = conf.dnsDiscoveryUrl
504+
info "Discovering nodes using Waku DNS discovery", url = conf.dnsDiscoveryUrl
505505
dnsDiscoveryUrl = some(conf.dnsDiscoveryUrl)
506506

507507
var discoveredNodes: seq[RemotePeerInfo]

apps/liteprotocoltester/liteprotocoltester.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ when isMainModule:
130130
error "Starting waku failed", error = error
131131
quit(QuitFailure)
132132

133-
debug "Setting up shutdown hooks"
133+
info "Setting up shutdown hooks"
134134

135135
proc asyncStopper(waku: Waku) {.async: (raises: [Exception]).} =
136136
await waku.stop()

apps/liteprotocoltester/service_peer_management.nim

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ proc selectRandomCapablePeer*(
7373
let rndPeerIndex = rand(0 .. supportivePeers.len - 1)
7474
let randomPeer = supportivePeers[rndPeerIndex]
7575

76-
debug "Dialing random peer",
76+
info "Dialing random peer",
7777
idx = $rndPeerIndex, peer = constructMultiaddrStr(randomPeer)
7878

7979
supportivePeers.delete(rndPeerIndex .. rndPeerIndex)
@@ -82,12 +82,12 @@ proc selectRandomCapablePeer*(
8282
if (await connOpt.withTimeout(10.seconds)):
8383
if connOpt.value().isSome():
8484
found = some(randomPeer)
85-
debug "Dialing successful",
85+
info "Dialing successful",
8686
peer = constructMultiaddrStr(randomPeer), codec = codec
8787
else:
88-
debug "Dialing failed", peer = constructMultiaddrStr(randomPeer), codec = codec
88+
info "Dialing failed", peer = constructMultiaddrStr(randomPeer), codec = codec
8989
else:
90-
debug "Timeout dialing service peer",
90+
info "Timeout dialing service peer",
9191
peer = constructMultiaddrStr(randomPeer), codec = codec
9292

9393
return found
@@ -105,8 +105,8 @@ proc tryCallAllPxPeers*(
105105
var supportivePeers = pm.switch.peerStore.getPeersByCapability(capability)
106106

107107
lpt_px_peers.set(supportivePeers.len)
108-
debug "Found supportive peers count", count = supportivePeers.len()
109-
debug "Found supportive peers", supportivePeers = $supportivePeers
108+
info "Found supportive peers count", count = supportivePeers.len()
109+
info "Found supportive peers", supportivePeers = $supportivePeers
110110
if supportivePeers.len == 0:
111111
return none(seq[RemotePeerInfo])
112112

@@ -116,7 +116,7 @@ proc tryCallAllPxPeers*(
116116
let rndPeerIndex = rand(0 .. supportivePeers.len - 1)
117117
let randomPeer = supportivePeers[rndPeerIndex]
118118

119-
debug "Dialing random peer",
119+
info "Dialing random peer",
120120
idx = $rndPeerIndex, peer = constructMultiaddrStr(randomPeer)
121121

122122
supportivePeers.delete(rndPeerIndex, rndPeerIndex)

apps/networkmonitor/networkmonitor.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ proc setConnectedPeersMetrics(
213213
continue
214214
var customPeerInfo = allPeers[peerIdStr]
215215

216-
debug "connected to peer", peer = customPeerInfo[]
216+
info "connected to peer", peer = customPeerInfo[]
217217

218218
# after connection, get supported protocols
219219
let lp2pPeerStore = node.switch.peerStore
@@ -358,7 +358,7 @@ proc retrieveDynamicBootstrapNodes(
358358

359359
if dnsDiscoveryUrl != "":
360360
# DNS discovery
361-
debug "Discovering nodes using Waku DNS discovery", url = dnsDiscoveryUrl
361+
info "Discovering nodes using Waku DNS discovery", url = dnsDiscoveryUrl
362362

363363
var nameServers: seq[TransportAddress]
364364
for ip in dnsAddrsNameServers:
@@ -376,7 +376,7 @@ proc retrieveDynamicBootstrapNodes(
376376
return (await value.findPeers()).mapErr(e => $e)
377377
warn "Failed to init Waku DNS discovery"
378378

379-
debug "No method for retrieving dynamic bootstrap nodes specified."
379+
info "No method for retrieving dynamic bootstrap nodes specified."
380380
ok(newSeq[RemotePeerInfo]()) # Return an empty seq by default
381381

382382
proc getBootstrapFromDiscDns(

apps/wakucanary/wakucanary.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ proc areProtocolsSupported(
123123

124124
for rawProtocol in toValidateProtocols:
125125
let protocolTag = ProtocolsTable[rawProtocol]
126-
debug "Checking if protocol is supported", expected_protocol_tag = protocolTag
126+
info "Checking if protocol is supported", expected_protocol_tag = protocolTag
127127

128128
var protocolSupported = false
129129
for nodeProtocol in nodeProtocols:

apps/wakunode2/wakunode2.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ when isMainModule:
6060
error "Starting waku failed", error = error
6161
quit(QuitFailure)
6262

63-
debug "Setting up shutdown hooks"
63+
info "Setting up shutdown hooks"
6464
proc asyncStopper(waku: Waku) {.async: (raises: [Exception]).} =
6565
await waku.stop()
6666
quit(QuitSuccess)

examples/wakustealthcommitments/node_spec.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ proc setup*(): Waku =
4646
if conf.relay:
4747
conf.rlnRelay = twnNetworkConf.rlnRelay
4848

49-
debug "Starting node"
49+
info "Starting node"
5050
var waku = (waitFor Waku.new(conf)).valueOr:
5151
error "Waku initialization failed", error = error
5252
quit(QuitFailure)

0 commit comments

Comments
 (0)