Adding the dependency
The logs the Dropwizard configuration using SLF4J It serializes the in memory configuration object to json and logs that json not the contents of the original configuration file The output contains default values set by constructors that were not specified in the original configuration file To turn it on add to the list of registered bundles Now will log something like this on startup Note that the section at the end was not specified in It comes from serializing the output of This output can be helpful for fleshing out the configuration file with default options Including redundant defaults makes it easier to edit the configuration by hand It s easier to flip a boolean flag from to than to first figure out where in the configuration file it belongs and the exact spelling of its key The also logs the default configuration at the level It does this by instantiating a new copy of the configuration class using the default no arg constructor serializing it to json and logging it The default configuration output can be useful for finding redundant configuration to remove lives in the module ConfigLoggingBundle ConfigLoggingBundle @Override public void initialize Bootstrap<HelloWorldConfiguration> bootstrap bootstrap setConfigurationFactoryFactory new JsonConfigurationFactoryFactory<> bootstrap addBundle new EnvironmentConfigBundle bootstrap addBundle new ObjectMapperBundle bootstrap addBundle new ConfigLoggingBundle StructuredArgumentsMDCLogger structuredLogger new StructuredArgumentsMDCLogger bootstrap getObjectMapper bootstrap addBundle new JerseyHttpLoggingBundle structuredLogger bootstrap addBundle new ClockBundle bootstrap addBundle new UUIDBundle bootstrap addBundle new H2Bundle bootstrap addBundle new ConnectionManagerHolderBundle bootstrap addBundle new ReladomoBundle bootstrap addCommand new RenderCommand bootstrap addBundle new AssetsBundle bootstrap addBundle new MigrationsBundle<> @Override public DataSourceFactory getDataSourceFactory HelloWorldConfiguration configuration return configuration getNamedDataSourcesFactory getNamedDataSourceFactoryByName h2 tcp bootstrap addBundle new LiftwizardLiquibaseMigrationBundle bootstrap addBundle new ViewBundle<> @Override public Map<String Map<String String>> getViewConfiguration HelloWorldConfiguration configuration return configuration getViewRendererConfiguration bootstrap addBundle new Slf4jUncaughtExceptionHandlerBundle bootstrap addBundle new AuthFilterBundle HelloWorldApplication INFO 12 53 29 main liftwizard priority 8 liftwizard bundle ConfigLoggingBundle io liftwizard dropwizard bundle config logging ConfigLoggingBundle Inferred Dropwizard configuration template Hello %s defaultName Stranger configLogging enabled true metrics frequency 1 minute reporters metrics test example json5 io dropwizard Configuration getMetricsFactory @JsonProperty metrics public MetricsFactory getMetricsFactory return metrics false true ConfigLoggingBundle DEBUG ConfigLoggingBundle liftwizard bundle logging config <dependency> <groupId>io liftwizard< groupId> <artifactId>liftwizard bundle logging config< artifactId> < dependency>