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

arquillian/appclient wip progress logging changes #1647

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

scottmarlow
Copy link
Contributor

Make the appclient logging a little less verbose by default at line 86.

I'm not yet sure why the logged information at 122 doesn't show the ear deployment file name (instead it seems to show the client jar (which is part of the ear). It would be nice to show the top level deployment as well.

@scottmarlow
Copy link
Contributor Author

scottmarlow commented Nov 12, 2024

@jamezp please review when you have a chance.

Copy link
Contributor

@jamezp jamezp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this seems reasonable. One question I'd ask though is will we always be running with DEBUG logs enabled? Given what is logged, I assume yes. If so, we might want to consider keeping them at INFO, but I don't have a strong opinion there.

boolean sawStatus = false;
MainStatus status = MainStatus.NOT_RUN;
String reason = "None";
String description = "None";
for (String line : lines) {
System.out.println(line);
log.finer(line);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part could end up making it look a little odd if it's already a formatted log line. I also feel this should be at level fine not finer.

@@ -117,6 +119,7 @@ public TestResult invoke(TestMethodExecutor testMethodExecutor) {
break;
}
result.addDescription(description);
log.info(result.toString() + ": " + description + ": " + vehicleArchiveName + ": " + appArchiveName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might look a little better with something like:

log.log(level, String.format("%s_%s [%s] %s : %s", vehicaleArchiveName, appArchiveName, result.getStatus(), description, result);

Note I'm not sure how the vehicaleArchiveName and appArchiveName should be formatted.

The level should be set in the in the switch statement right above this log line IMO. Then for ERROR and FAILED status we could set the level to Level.SEVERE.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, switching over to this style. I don't think the appclient jar or vehicle names are what I really wanted to show here. Showing the EAR name would be nicer (based on how we current include more information in the ear name). Revising...

Copy link
Contributor Author

@scottmarlow scottmarlow Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update this to show the new output with:

result.addDescription(description);
log.log(Level.INFO, String.format("[%s] %s : %s", result.getStatus(), description, result));

@scottmarlow
Copy link
Contributor Author

Overall this seems reasonable. One question I'd ask though is will we always be running with DEBUG logs enabled? Given what is logged, I assume yes. If so, we might want to consider keeping them at INFO, but I don't have a strong opinion there.

I have to verify as currently, I have the platformtck/glassfish-runner/persistence-platform-tck/jakartaeetck/bin/ts.jte harness.log.traceflag=true which might influence some logging levels.

@@ -117,6 +120,7 @@ public TestResult invoke(TestMethodExecutor testMethodExecutor) {
break;
}
result.addDescription(description);
log.log(Level.FINE, String.format("[%s] %s : %s", result.getStatus(), description, result));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still feel like it makes sense to make the level configurable. Meaning, use a level based on the status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants