diff --git a/src/main/java/de/rub/nds/modifiablevariable/logging/ExtendedPatternLayout.java b/src/main/java/de/rub/nds/modifiablevariable/logging/ExtendedPatternLayout.java index 07cddd51..d45504e1 100644 --- a/src/main/java/de/rub/nds/modifiablevariable/logging/ExtendedPatternLayout.java +++ b/src/main/java/de/rub/nds/modifiablevariable/logging/ExtendedPatternLayout.java @@ -147,6 +147,17 @@ public static ExtendedPatternLayout.SerializerBuilder newSerializerBuilder() { return new ExtendedPatternLayout.SerializerBuilder(); } + /** + * Determines if this layout requires location information (i.e., class name, method name, line + * number). + * + *
Location information can be expensive to generate, so this method allows the logging + * framework to determine whether it needs to capture stack traces for log events processed by + * this layout. + * + * @return {@code true} if the configured event serializer requires location information, {@code + * false} otherwise + */ @Override public boolean requiresLocation() { return eventSerializer instanceof LocationAware @@ -530,6 +541,14 @@ public ExtendedPatternLayout.Builder withFooter(String footer) { return this; } + /** + * Builds a new ExtendedPatternLayout instance with the configured settings. + * + *
This method creates a new layout using all the settings configured on this builder. If + * no configuration has been explicitly set, a default configuration will be used. + * + * @return A new ExtendedPatternLayout instance configured with the specified settings + */ @Override public ExtendedPatternLayout build() { if (configuration == null) { @@ -637,6 +656,20 @@ public SerializerBuilder() { private boolean disableAnsi; private boolean noConsoleNoAnsi; + /** + * Builds a serializer for formatting log events according to the configured settings. + * + *
This method creates an appropriate serializer based on the configured options: + * + *