Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
1.2.0
-
None
-
None
Description
PropertiesFileConfigurationProvider extends AbstractFileConfiguration. AbstractFileConfiguration doesn't really do much but provide getters and setters for a few things. The main logic is in PropertiesFileConfigurationProvider in the form of the loadChannels, loadSources and loadSinks methods. However, these methods are all private. PropertiesFileConfigurationProvider exposes the load method as protected, which should allow a class extending PropertiesFileConfigurationProvider to override it. However, since the previously mentioned methods in PropertiesFileConfigurationProvider are all private they can't be accessed from the extending class.
In addition, classes extending PropertiesFileConfigurationProvider should be provided a load method that accepts a Reader or an InputStream so that they can dynamically create the configuration.
I am building an "embedded Appender" for Log4j 2 and I am essentially having to write my configuration handling from scratch since there is not good way to extend these classes. Similarly, a JMX implementation would encounter the same problems.
Attachments
Issue Links
- is duplicated by
-
FLUME-1630 Flume configuration code could be improved
- Resolved