Search code examples
scalaloggingakka

How to prevent Akka LoggingAdapter from truncating ByteString log messages?


I'm new to Scala with Akka. I'm using LoggingAdapter to log ByteString messages. I see a common scenario where a decently large message gets truncated. For example,

enter image description here

I need to see the entire message. Please help me here.


Solution

  • We can convert the ByteString to an array and then print the individual bytes in a space-separated manner.

    val myArr : Array[Byte] = byteStringMessage.toArray
    log.info(s" byte array : ${myArr.mkString(" ")}")