Logging
object Logging
Facilities for on-the-side logging of either encoding or decoding progress, which can be useful for debugging problems with the input or custom codec logic.
Logging can be done either before or after the input validation step, depending on your needs. If unsure, go for after-validation logging, at least initially. (This is also the default.) For example, to log decoding progress to the console you can say:
Cbor.decode(inputBytes).withPrintLogging().to[MyType]
Type members
Classlikes
class PrintLogger(val info: LevelInfo, val maxShownByteArrayPrefixLen: Int, val maxShownStringPrefixLen: Int, val maxShownArrayElems: Int, val maxShownMapEntries: Int, val initialGutterWidth: Int, val renderLevelCount: Boolean, val renderEndOfInput: Boolean, val renderCommas: Boolean, val indentation: String, val mapKeySep: String) extends LineFormatLogger
A LineFormatLogger that simply prints all lines to the console.
A LineFormatLogger that simply prints all lines to the console.
class ToStringLogger(val info: LevelInfo, val stringBuilder: StringBuilder, val maxShownByteArrayPrefixLen: Int, val maxShownStringPrefixLen: Int, val maxShownArrayElems: Int, val maxShownMapEntries: Int, val initialGutterWidth: Int, val renderLevelCount: Boolean, val renderEndOfInput: Boolean, val renderCommas: Boolean, val indentation: String, val mapKeySep: String, val lineSep: String, val mapValueOnNewLine: Boolean) extends LineFormatLogger
A LineFormatLogger that appends all lines to a given JStringBuilder.
A LineFormatLogger that appends all lines to a given JStringBuilder.