Changes in logging (#145)
- move noisy logging to trace level - log entire broken ws message
This commit is contained in:
@@ -74,7 +74,7 @@ abstract class AbstractHead @JvmOverloads constructor(
|
||||
}
|
||||
return source
|
||||
.filter {
|
||||
log.debug("Filtering block $upstreamId block $it")
|
||||
log.trace("Filtering block $upstreamId block $it")
|
||||
forkChoice.filter(it)
|
||||
}
|
||||
.doFinally {
|
||||
@@ -85,7 +85,7 @@ abstract class AbstractHead @JvmOverloads constructor(
|
||||
log.warn("Received signal $upstreamId $it unexpectedly - restart head")
|
||||
lastHeadUpdated = 0L
|
||||
} else {
|
||||
log.warn("Received signal $upstreamId $it - stop emit new head!!!")
|
||||
log.warn("Received signal $upstreamId $it - stop emit new head")
|
||||
completed = true
|
||||
stream.tryEmitComplete()
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ abstract class DefaultUpstream(
|
||||
Status(curr.lag, avail, statusByLag(curr.lag, avail))
|
||||
}.also {
|
||||
statusStream.emitNext(it.status) { _, res -> res == Sinks.EmitResult.FAIL_NON_SERIALIZED }
|
||||
log.debug("Status of upstream [$id] changed to [$it], requested change status to [$avail]")
|
||||
log.trace("Status of upstream [$id] changed to [$it], requested change status to [$avail]")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ abstract class DefaultUpstream(
|
||||
Status(nLag, curr.avail, statusByLag(nLag, curr.avail))
|
||||
}.also {
|
||||
statusStream.emitNext(it.status) { _, res -> res == Sinks.EmitResult.FAIL_NON_SERIALIZED }
|
||||
log.debug("Status of upstream [$id] changed to [$it], requested change lag to [$lag]")
|
||||
log.trace("Status of upstream [$id] changed to [$it], requested change lag to [$lag]")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ open class WsConnectionImpl(
|
||||
}
|
||||
onMessage(msg)
|
||||
} catch (t: Throwable) {
|
||||
log.warn("Failed to process WS message. ${t.javaClass}: ${t.message}")
|
||||
log.warn("Failed to process WS message. ${t.javaClass}: ${t.message}. Message: ${String(it)}")
|
||||
Mono.empty()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,23 +27,23 @@ class PriorityForkChoice : ForkChoice {
|
||||
|
||||
override fun choose(block: BlockContainer): ForkChoice.ChoiceResult {
|
||||
head.get()?.let {
|
||||
log.debug("Candidate for priority forkchoice (${block.height}, ${block.nodeRating}), current is (${it.height},${it.nodeRating})")
|
||||
log.trace("Candidate for priority forkchoice (${block.height}, ${block.nodeRating}), current is (${it.height},${it.nodeRating})")
|
||||
}
|
||||
val nwhead = head.updateAndGet { curr ->
|
||||
if (!filter(block)) {
|
||||
log.debug("Preparing to deny block ${block.height}")
|
||||
log.trace("Preparing to deny block ${block.height}")
|
||||
curr
|
||||
} else {
|
||||
log.debug("Preparing to accept block ${block.height}")
|
||||
log.trace("Preparing to accept block ${block.height}")
|
||||
seenBlocks.put(block.hash, true)
|
||||
block
|
||||
}
|
||||
}
|
||||
if (nwhead.hash == block.hash) {
|
||||
log.debug("Accepted block ${block.height}")
|
||||
log.trace("Accepted block ${block.height}")
|
||||
return ForkChoice.ChoiceResult.Updated(nwhead)
|
||||
}
|
||||
log.debug("Denied block ${block.height}")
|
||||
log.trace("Denied block ${block.height}")
|
||||
return ForkChoice.ChoiceResult.Same(nwhead)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user