Resolves https://github.com/kazu-yamamoto/logger/issues/147. This instance is a little unintuitive. The bytestring builder must be materialized to a lazy bytestring to give us access to the length. Rather than putting the original Builder argument in the LogStr, we create a new builder from this lazy bytestring. This avoids duplicating work, which helps when computation inside a Builder is expensive.
Resolves https://github.com/kazu-yamamoto/logger/issues/147. This instance is a little unintuitive. The bytestring builder must be materialized to a lazy bytestring to give us access to the length. Rather than putting the original
Builder
argument in theLogStr
, we create a new builder from this lazy bytestring. This avoids duplicating work, which helps when computation inside aBuilder
is expensive.