Interface ConfigurationWriter
- All Known Subinterfaces:
ConfigurationMapper
@ProviderType
public interface ConfigurationWriter
Interface to be implemented by format providers that can write a configuration file format.
Implementations of this class should be registered with ServiceLoader
.
-
Method Summary
Modifier and TypeMethodDescriptionA short string that identifies the format supported by this writer.A description of the supported format for self-documentation purposes.void
writeConfiguration
(OutputStream outputStream, ConfigurationNode configuration) Write a tree of configuration nodes to a configuration file.
-
Method Details
-
getOutputFormat
String getOutputFormat()A short string that identifies the format supported by this writer.For example, "v2:xml" or "v1:properties".
-
getOutputFormatDescription
String getOutputFormatDescription()A description of the supported format for self-documentation purposes. -
writeConfiguration
void writeConfiguration(OutputStream outputStream, ConfigurationNode configuration) throws IOException Write a tree of configuration nodes to a configuration file.The returned tree should represent a valid Log4j Core 2 configuration.
- Parameters:
outputStream
- The output configuration file.configuration
- A tree of configuration nodes.- Throws:
IOException
- If a writing error occurs.
-