Merge pull request #43314 from quaff

* gh-43314:
  Polish "Document StructuredLoggingJsonMembersCustomizer constructor params"
  Document StructuredLoggingJsonMembersCustomizer constructor params

Closes gh-43314
This commit is contained in:
Andy Wilkinson 2024-11-28 13:39:50 +00:00
commit b5feadab13
1 changed files with 14 additions and 1 deletions

View File

@ -16,15 +16,28 @@
package org.springframework.boot.logging.structured;
import ch.qos.logback.classic.pattern.ThrowableProxyConverter;
import org.springframework.boot.json.JsonWriter;
import org.springframework.boot.json.JsonWriter.Members;
import org.springframework.core.env.Environment;
/**
* Customer that can be injected into a {@link StructuredLogFormatter} implementations to
* Customizer that can be injected into {@link StructuredLogFormatter} implementations to
* customize {@link JsonWriter} {@link Members}.
* <p>
* An implementation may be provided using the {@code logging.structured.json.customizer}
* property.
* <p>
* Implementing classes can declare the following parameter types in the constructor:
* <ul>
* <li>{@link Environment}</li>
* </ul>
* When using Logback, implementing classes can also use the following parameter types in
* the constructor:
* <ul>
* <li>{@link ThrowableProxyConverter}</li>
* </ul>
*
* @param <T> the type being written
* @author Phillip Webb