Closed maoe closed 4 years ago
It might be useful to make the binary printer user configurable.
buildEventInfo :: EventInfo -> TB.Builder
buildEventInfo = buildEventInfoWith $ \payload ->
"binary message " <> TB.fromText (replaceUnprintableWith '.' payload)
buildEventInfoWith :: (B.ByteString -> TB.Builder) -> EventInfo -> TB.Builder
buildEventInfoWith = ...
Is anyone available to review this PR? If no one is available in a week or so I'll just merge it and release.
It's been a week since the last comment. I'll go ahead.
This PR adds support for the EVENT_USER_BINARY_MSG event implemented in https://gitlab.haskell.org/ghc/ghc/commit/21f0f56164f50844c2150c62f950983b2376f8b6, which was included in GHC 8.8.1.
Since it's binary logging, ghc-events show/inc need to deal with unprintable characters. Currently those characters are replaced with
.
s, which may be arguable (i.e. binary logging tends to emit long messages so ghc-events probably shouldn't print the whole message etc).The test eventlog was generated by the following source code
and the output contains this line: