Log stacktrace on deserialization error (#31432)
Deserialization errors are usually programming errors that are not really recoverable, so it seems to make sense to log at the ERROR level, plus this gives the operator access to the stacktrace which might be helpful in diagnosing the problem.
This commit is contained in:
parent
462b473899
commit
3f61dfdbac
2 changed files with 5 additions and 5 deletions
|
|
@ -681,12 +681,12 @@ private[remote] class Deserializer(
|
|||
case OptionVal.Some(a) => a.remoteAddress
|
||||
case _ => "unknown"
|
||||
}
|
||||
log.warning(
|
||||
"Failed to deserialize message from [{}] with serializer id [{}] and manifest [{}]. {}",
|
||||
log.error(
|
||||
e,
|
||||
"Failed to deserialize message from [{}] with serializer id [{}] and manifest [{}].",
|
||||
from,
|
||||
envelope.serializer,
|
||||
envelope.classManifest,
|
||||
e)
|
||||
envelope.classManifest)
|
||||
pull(in)
|
||||
} finally {
|
||||
val buf = envelope.envelopeBuffer
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class SerializationErrorSpec extends ArteryMultiNodeSpec(ArterySpecSupport.defau
|
|||
expectMsg("ping")
|
||||
|
||||
EventFilter
|
||||
.warning(pattern = """Failed to deserialize message from \[.*\] with serializer id \[4\]""", occurrences = 1)
|
||||
.error(pattern = """Failed to deserialize message from \[.*\] with serializer id \[4\]""", occurrences = 1)
|
||||
.intercept {
|
||||
remoteRef ! "boom".getBytes("utf-8")
|
||||
}(systemB)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue