Skip to content

Conversation

@Sj-Si
Copy link
Contributor

@Sj-Si Sj-Si commented Nov 6, 2025

Brief

This PR updates all logging to use the updated MessageLog functions in the automation_library.

This PR depends on Sj-Si:chore/message-log

Changes

The biggest change in this PR is in the Game object, where we removed the printToLog function. This forced all references to game.printToLog() to instead use the MessageLog logging functions.

This helps to decouple logging functionality so that individual components do not rely as much on having a reference to a Game object stored at runtime.

Please review the associated PR linked above for more detailed information on the changes to MessageLog.

Notes

I have not been able to perform a live test of these changes since I don't know how to run the app while using a different branch of the automation_library.

Copy link
Contributor Author

@Sj-Si Sj-Si left a comment

Choose a reason for hiding this comment

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

Performed self review of changes. Fixed any issues that I found along the way.

@steve1316 steve1316 self-requested a review November 6, 2025 21:55
@steve1316 steve1316 self-assigned this Nov 6, 2025
@steve1316 steve1316 added the enhancement New feature or request label Nov 6, 2025
@github-project-automation github-project-automation bot moved this to In progress in My TODO List Nov 6, 2025
@steve1316
Copy link
Owner

I will hold off on this until the next version is ready to be released. Just in case we need to refactor the project to use the log level wrappers again.

@steve1316
Copy link
Owner

Alright I am freezing additional changes for v4.0.1. This PR will be for merged for v4.0.2.

@steve1316
Copy link
Owner

Had to merge master to this branch as there were too many changes made since. I will start refactoring to use the log level wrappers.

@Sj-Si
Copy link
Contributor Author

Sj-Si commented Nov 12, 2025

Had to merge master to this branch as there were too many changes made since. I will start refactoring to use the log level wrappers.

One thing I noticed is in a few places the base Log library was used for logging instead of MessageLog. I left these alone since I assumed you intentionally used Log instead of the MessageLog in those cases. I figured that the items logged with Log would have been too verbose for the app's log to display or something like that. Am I correct in this assumption, or do we need to update those log statements as well?

@steve1316
Copy link
Owner

Had to merge master to this branch as there were too many changes made since. I will start refactoring to use the log level wrappers.

One thing I noticed is in a few places the base Log library was used for logging instead of MessageLog. I left these alone since I assumed you intentionally used Log instead of the MessageLog in those cases. I figured that the items logged with Log would have been too verbose for the app's log to display or something like that. Am I correct in this assumption, or do we need to update those log statements as well?

Yup you are correct. Too verbose IIRC.

@Sj-Si
Copy link
Contributor Author

Sj-Si commented Nov 12, 2025

As for the TAG variable being in all caps, that's just a habit I picked up from some embedded C work I did. I have no clue if that is actually a standard so it's up to you how we handle that. I know android studio gets angry about screaming snake case in some instances so I really don't know how it should be handled.

Copy link
Owner

@steve1316 steve1316 left a comment

Choose a reason for hiding this comment

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

Works great in my test runs. LGTM!

@github-project-automation github-project-automation bot moved this from In progress to Reviewer approved in My TODO List Nov 12, 2025
@steve1316
Copy link
Owner

As for the TAG variable being in all caps, that's just a habit I picked up from some embedded C work I did. I have no clue if that is actually a standard so it's up to you how we handle that. I know android studio gets angry about screaming snake case in some instances so I really don't know how it should be handled.

I think I started with all caps for the tag for the aesthetics 4 years ago for some reason haha

@steve1316 steve1316 merged commit f64527d into steve1316:master Nov 12, 2025
@github-project-automation github-project-automation bot moved this from Reviewer approved to Done in My TODO List Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants