Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to customize the PrettyPrinter #926

Merged
merged 1 commit into from
Feb 4, 2023
Merged

Commits on Feb 4, 2023

  1. Add ability to customize the PrettyPrinter

    Add ability to customize the PrettyPrinter used by PrettyPrintingJsonGeneratorDecorator.
    
    Specifically, add rootSeparator and spacesInObjectEntries fields.
    
    Change default root value separator used by the PrettyPrinter to an empty string to match the default rootValueSeparator used by the formatters.
    Previously, the default was a space (" ").  So this will slightly change the output when the PrettyPrintingJsonGeneratorDecorator is used.
    To revert to the old behavior, configure the decorator like this:
    
    <jsonGeneratorDecorator class="net.logstash.logback.decorate.PrettyPrintingJsonGeneratorDecorator">
    	<rootSeparator>[SPACE]</rootSeparator>
    </jsonGeneratorDecorator>
    
    Requested in discussion #906
    philsttr committed Feb 4, 2023
    Configuration menu
    Copy the full SHA
    0de6b64 View commit details
    Browse the repository at this point in the history