You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create an additional annotation @LogIgnore and associated filter to augment @JsonIgnore for logging. Additionally, the configuration for @LogIgnore should allow disabling of @JsonIgnore (e.g. to ignore @JsonIgnore).
This is similar to the relationship between @LogValue and @JsonValue. The pattern allows developers to create a distinct serialization profile of a class for logging and another one for standard serialization/deserialization. It is particularly important when the existing serialization profile already exists and logging is being migrated to Logback-Steno.
Disabling @JsonIgnore and using @LogIgnore instead would accomplish at least part of this. We will still need to investigate how to support customized serialization and the annotations that come with it.
packagecom.arpnetworking.logback.annotations;
importjava.lang.annotation.ElementType;
importjava.lang.annotation.Retention;
importjava.lang.annotation.RetentionPolicy;
importjava.lang.annotation.Target;
/*** Annotation that marks a field to be ignored by the RedactionFilter in StenoEncoder.** @author Ville Koskela (vkoskela at groupon dot com)* @see com.arpnetworking.logback.jackson.RedactionFilter* @since 1.9.0*/@Target( { ElementType.METHOD, ElementType.FIELD } )
@Retention(RetentionPolicy.RUNTIME)
public @interface LogIgnore {
}
Create an additional annotation @LogIgnore and associated filter to augment @JsonIgnore for logging. Additionally, the configuration for @LogIgnore should allow disabling of @JsonIgnore (e.g. to ignore @JsonIgnore).
This is similar to the relationship between @LogValue and @JsonValue. The pattern allows developers to create a distinct serialization profile of a class for logging and another one for standard serialization/deserialization. It is particularly important when the existing serialization profile already exists and logging is being migrated to Logback-Steno.
Disabling @JsonIgnore and using @LogIgnore instead would accomplish at least part of this. We will still need to investigate how to support customized serialization and the annotations that come with it.
See: FasterXML/jackson-databind#133
Reference implementation of annotation:
Reference implementation of filter:
The text was updated successfully, but these errors were encountered: