Skip to content

Quick and dirty utility for pretty printing protobuf short debug strings.

License

Notifications You must be signed in to change notification settings

mrbrowning/proto-print

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proto-print

Requires cabal to build.

Sometimes you have short debug strings for protobufs (e.g. the kind returned from TextFormat.shortDebugString() in Java) in your logs that you'd like to see formatted in a reasonable way so you can understand the hierarchy. Maybe changing the software you're working on to print long-format debug strings involves an onerous rebuild, so you'd prefer to just take the short version and have it formatted readably. If this incredibly specific need applies to you, you're in luck! Just:

    $ echo 'message { field: VALUE submessage { subfield: "subvalue" num_field: 12.34 } }' > proto.txt
    $ cabal run proto.txt
    message {
        field: VALUE
        submessage {
            subfield: "subvalue"
            num_field: 12.34
        }
    }

About

Quick and dirty utility for pretty printing protobuf short debug strings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages