[epilogue] Make nonloggable type warnings configurable (#7792)

Now a flag at the class level controls whether warning messages are printed.

Defaults to false (no warning messages).
This commit is contained in:
Sam Carlberg
2025-02-19 00:48:51 -05:00
committed by GitHub
parent 13626063dc
commit bd2211119f
4 changed files with 26 additions and 7 deletions

View File

@@ -124,4 +124,12 @@ public @interface Logged {
* for all logged fields and methods in an annotated class
*/
Naming defaultNaming() default Naming.USE_CODE_NAME;
/**
* Class-level only: if {@link #strategy()} is {@link Strategy#OPT_OUT}, this can be used to quiet
* the warnings that are printed for non-loggable fields and methods detected within the class.
*
* @return true if warnings should be printed, or false if warnings should not be printed
*/
boolean warnForNonLoggableTypes() default false;
}