Class StructuredLogFormatterFactory<E>
java.lang.Object
org.springframework.boot.logging.structured.StructuredLogFormatterFactory<E>
- Type Parameters:
- E- the log even type
Factory that can be used to create a fully instantiated 
StructuredLogFormatter
 for either a common format or a
 fully-qualified class name.- Since:
- 3.4.0
- Author:
- Moritz Halbritter, Phillip Webb
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceFactory used to create aStructuredLogFormatterfor a givenCommonStructuredLogFormat.static classCallback used for configure theStructuredLogFormatterFactory.CommonFormatterFactoryto use for a givenCommonStructuredLogFormat.
- 
Constructor SummaryConstructorsConstructorDescriptionStructuredLogFormatterFactory(Class<E> logEventType, Environment environment, Consumer<Instantiator.AvailableParameters> availableParameters, Consumer<StructuredLogFormatterFactory.CommonFormatters<E>> commonFormatters) Create a newStructuredLogFormatterFactoryinstance.
- 
Method SummaryModifier and TypeMethodDescriptionGet a newStructuredLogFormatterinstance for the specified format.
- 
Constructor Details- 
StructuredLogFormatterFactorypublic StructuredLogFormatterFactory(Class<E> logEventType, Environment environment, Consumer<Instantiator.AvailableParameters> availableParameters, Consumer<StructuredLogFormatterFactory.CommonFormatters<E>> commonFormatters) Create a newStructuredLogFormatterFactoryinstance.- Parameters:
- logEventType- the log event type
- environment- the Spring- Environment
- availableParameters- callback used to configure available parameters for the specific logging system
- commonFormatters- callback used to define supported common formatters
 
 
- 
- 
Method Details- 
getGet a newStructuredLogFormatterinstance for the specified format.- Parameters:
- format- the format requested (either a- CommonStructuredLogFormatID or a fully-qualified class name)
- Returns:
- a new StructuredLogFormatterinstance
- Throws:
- IllegalArgumentException- if the format is unknown
 
 
-