The idea is to add a new way of configuring Logback using HOCON format (Typesafe's Config), in addition to XML and Groovy. The motivation is that for projects that use HOCON for their main configuration (e.g. application.conf) it would be very convenient just to add an additional "logback" section instead of providing a separate configuration file. Moreover, Typesafe's Config provides many features that would be beneficial also for configuring Logback (e.g. reference configuration merging).
Below is an example of the proposed configuration syntax based on a sample XML config:
HOCON equivalent (e.g application.conf):
Standard XML config's features not directly supported:
-
Conditional processing of a configuration file.
-
Properties and variable substitution (but supported to some extend by HOCON itself).
-
File inclusion (but supported by HOCON itself).
I have a PoC version of the above that I would like to share. Please let me know what do you think.
|