-
Notifications
You must be signed in to change notification settings - Fork 611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[epilogue] allow arrays with @Logged types to be logged #7499
base: main
Are you sure you want to change the base?
Conversation
if (arrayElement.getModifiers().contains(Modifier.FINAL)) { | ||
return m_loggableHandler.isLoggableType(componentType); | ||
} else { | ||
m_processingEnv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this will cause two messages to be emitted: one for the general "not a loggable type", and this message
"[EPILOGUE] Excluded from logs because array " | ||
+ arrayElement | ||
+ " isn't marked as final(or is returned from a method).", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could check the type of the element to be VariableElement
or ExecutableElement
to provide a more specific message
This feature is only be restricted to final arrays; as variable-size containers would cause data to become stale and misrepresent what is being logged.