Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Daniel1464
Copy link
Contributor

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.

@Daniel1464 Daniel1464 requested a review from a team as a code owner December 6, 2024 14:26
@SamCarlberg SamCarlberg added the component: epilogue Annotation-based logging library label Dec 7, 2024
if (arrayElement.getModifiers().contains(Modifier.FINAL)) {
return m_loggableHandler.isLoggableType(componentType);
} else {
m_processingEnv
Copy link
Member

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

Comment on lines 76 to 78
"[EPILOGUE] Excluded from logs because array "
+ arrayElement
+ " isn't marked as final(or is returned from a method).",
Copy link
Member

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

@Daniel1464 Daniel1464 changed the title Allow arrays with @Logged types to be logged [epilogue] allow arrays with @Logged types to be logged Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: epilogue Annotation-based logging library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants