Add debug logging of the usage of array access methods so that we can… #3013
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.
… discover all the hidden places it's being used.
Purpose
Whilst trying to get the feature flagged tests working when it's enabled I keep coming across bits of the app that were never migrated to the new interfaces and continue to use the old array access.
This PR adds debug logging to those usages so that we can see them in the logs.
It's quite possible that even whilst not logging at the debug level there will be a performance impact in production since the data is still collected. If that's found to be the case then we should back it out.
Approach
Add log calls to offset* methods.
Learning
If we'd done our due diligence when putting together the interim Sirius object and had mandated the usage of a factory class to build them (instead of 'newing' up everywhere) this PR would be about 4 files and 3 hours less work.
Checklist (tick/delete or
strikethroughas appropriate)New event_codes have been documented on the wiki pageI have updated documentation (Confluence/GitHub wiki/tech debt doc)I have added welsh translation tags and updated translation filesI have run an accessibility tool on any pages I have made changes to and fixed any issues foundI have notified the Interaction Designer of any content changes so that appropriate screenshots/flow diagram changes can be madeThe product team have tested these changes