Added log ids to logs #440
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to implement #226, but is currently very work-in-progress and exists as more of a starting point than a final draft.
Each module of the code, besides getting the prefix, also gets an identifier, usually a lowercase version of its name, like "sensormanager" or "battery" or "fs", etc etc. Each module then has a list of numbers corresponding to one or a few messages all falling within the same narrow category, for example, the "Handshake successful, server is ..." message gets the unique HandshakeSuccessful id (connection-5), but anything that's manual calibration related would likely get the CalibrationInstruction id (sensor-9).
The format is then as follows:
The benefits of this technique:
And the cons:
There are a couple other ways to go about this, in particular
For several reasons I didn't like either of those options, so I went with this one instead.