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

Cleanup DTLog, implement log levels #39

Merged
merged 8 commits into from
Oct 14, 2023
Merged

Cleanup DTLog, implement log levels #39

merged 8 commits into from
Oct 14, 2023

Conversation

MathNerd28
Copy link
Member

  • Add version suffix in DTLibInfo
  • Remove duplicate mode logging
  • Use tryFlush() instead of flush()
  • Add constant LOG_PATH_SEPARATOR
  • Use RobotController.getTeamNumber() instead of custom implementation
  • Change unknown team number to 0
  • General cleanup, suppress useless warnings

@MathNerd28 MathNerd28 changed the title Cleanup DTLog after merge Cleanup DTLog, implement log levels Oct 13, 2023
@MathNerd28
Copy link
Member Author

Implement log levels for variables. They filter variables based on their immediate parent's log level, allowing components to be selectively logged based on the current level. Levels for variables are not denoted in the log output.

Also, properly implement log levels for messages. These are denoted in the log, under identifiers 0x0008 through 0x000B.

@MathNerd28 MathNerd28 marked this pull request as ready for review October 13, 2023 13:07
@MathNerd28
Copy link
Member Author

Properly log exceptions where applicable (not during startup, DEBUG level when explicitly caught, etc.)

@MathNerd28
Copy link
Member Author

This PR is ready for review

writeInt(checksum);

Copy link
Member

Choose a reason for hiding this comment

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

You might consider something like CRC32 for the checksum: https://docs.oracle.com/javase/8/docs/api/java/util/zip/CRC32.html

@MathNerd28 MathNerd28 merged commit ef18b0e into master Oct 14, 2023
@MathNerd28 MathNerd28 deleted the dtlog branch October 14, 2023 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants