From f9cfaf628dbd64da4c245b707567cef898910ddd Mon Sep 17 00:00:00 2001 From: Eric Mastro Date: Mon, 24 Apr 2023 16:32:32 +1000 Subject: [PATCH] clean up logging --- codex/proving/proving.nim | 2 +- codex/proving/simulated.nim | 2 +- tests/integration/multinodes.nim | 1 + tests/integration/nodes.nim | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/codex/proving/proving.nim b/codex/proving/proving.nim index 220d31e7..82a2b9d6 100644 --- a/codex/proving/proving.nim +++ b/codex/proving/proving.nim @@ -58,7 +58,7 @@ method prove*(proving: Proving, slot: Slot) {.base, async.} = raiseAssert "onProve callback not set" try: let proof = await onProve(slot) - debug "submitting proof" + trace "submitting proof", currentPeriod = await proving.getCurrentPeriod() await proving.market.submitProof(slot.id, proof) except CatchableError as e: error "Submitting proof failed", msg = e.msg diff --git a/codex/proving/simulated.nim b/codex/proving/simulated.nim index 0730a95f..fd8120aa 100644 --- a/codex/proving/simulated.nim +++ b/codex/proving/simulated.nim @@ -40,7 +40,7 @@ method prove(proving: SimulatedProving, slot: Slot) {.async.} = proving.proofCount mod proving.failEveryNProofs == 0'u: proving.proofCount = 0 try: - debug "submitting INVALID proof" + trace "submitting INVALID proof", currentPeriod = await proving.getCurrentPeriod() await proving.market.submitProof(slot.id, newSeq[byte](0)) except ProviderError as e: if not e.revertReason.contains("Invalid proof"): diff --git a/tests/integration/multinodes.nim b/tests/integration/multinodes.nim index c457e152..e7c15354 100644 --- a/tests/integration/multinodes.nim +++ b/tests/integration/multinodes.nim @@ -20,6 +20,7 @@ template multinodesuite*(name: string, echo "" echo "More test debug logging is available by running the tests with " & "'-d:chronicles_log_level=TRACE " & + "-d:chronicles_disabled_topics=websock " & "-d:chronicles_default_output_device=stdout " & "-d:chronicles_sinks=textlines'" echo "" diff --git a/tests/integration/nodes.nim b/tests/integration/nodes.nim index f9a282b7..16010560 100644 --- a/tests/integration/nodes.nim +++ b/tests/integration/nodes.nim @@ -51,7 +51,7 @@ proc init*(_: type StartNodes, proc init*(_: type DebugNodes, client, provider, validator: bool, - topics: string = "validator,proving"): DebugNodes = + topics: string = "validator,proving,market"): DebugNodes = DebugNodes(client: client, provider: provider, validator: validator, topics: topics)