frc5024 / frc5024/lib5k

Consider adding a transaction ID to the logged messages

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
enhancement Proposal
Dominant language
Java
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

From my commentary on the logger changes

The command/subsystem paradigm allows for a simulated parallel processing where you might have concurrent activities each initiated through separate events but interleaved in the logs. In other logging systems there is a transaction id that is included in the log so that you can see the flow and pull out only those events for the activity you care about. A contrived example To make my point would be intaking while manipulating the control panel. The transaction id could be generated from the initial action of the human operator. Something to consider adding if you feel it would help debugging.

I’d think that the transaction ID would be where the action is initiated. So if the operator initiates a climb then a transaction id would be acquired and used for all subsequent logging calls that follow directly from that action. Since the transaction id would need to be unique something in the logger should assign them. Or you could use utime() at the time of initiation or a random number although that won’t be sequential so maybe not as useful

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.