Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for providing a custom layout during logging bootstrap
Dropwizard users have the ability to configure their application to use JSON as the logging format. Unfortunately, the default logging bootstrap mechanism which kicks off before Dropwizard logging configuration, uses the default logging layout. As a result, some internal logging messages (Jetty, Hibernate initialization) are produced in a not recognized format. This change add possibility to specify a layout factory during the bootstrap process. Users can override the bootstrap method of `Application` and provide an own layout format. For example, ``` BootstrapLogging.bootstrap(Level.INFO, (loggerContext, timeZone) -> new EventJsonLayoutBaseFactory().build(loggerContext, timeZone)); ``` As a result, the all applications logs will produced in the JSON format.
- Loading branch information
Showing
2 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters