Configurable global lock log level - #393
Open
rwb27 wants to merge 3 commits into
Open
Conversation
When an action can't start because the global lock is busy, it used to log at level `WARNING`. This is now configurable. I'm not massively in love with the way this is done, but it works. There's one issue I need to fix, which is that if you set the loglevel to `DEBUG` and the server isn't in debug mode, it's not possible to find out from the client what happened, i.e. the error is simply "unknown". Along the way, I found that the handler that provides logs for each invocation was set to use `INFO` level, even if debug logging was enabled on the server. I've now removed the level, so that it will respect whatever the server's been set to.
This ensures that code prior to !370 doesn't give an unknown error by default.
The tests now verify that the client will get the right error, even if the global lock is set not to show failures in the log.
Collaborator
Author
|
@bprobert97 you've reviewed the first two commits already - the final commit just adds another parameter to the test, for completeness, which passes now that #370 is in. |
This was referenced Aug 4, 2026
Closed
Contributor
|
I thought we decided that the way to get something to show up in the action log would be to use ThingLogger, allowing this to be used for UI. Any other logging still get the invocation-ID so can be grouped by the downstream code for displaying deeper logs. As such I think we do still want the "It adds a function to get the parent of all the Thing loggers, for Thing-adjacent code that wants its logs to show up in Invocation logs." item from #374. Because there are things where Thing adjacent code still wants to show up in the UI (in OpenFlexure this would be stitching) |
julianstirling
approved these changes
Aug 5, 2026
bprobert97
reviewed
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The global lock currently logs at
WARNINGlevel whenever an action fails to start. This is now configurable - it may be set toINFOor evenDEBUGto reduce noise in the log.If a client tries to invoke an action and the action fails to start because of the global lock, the
Invocationobject returned will allow the client to determine that it was a global lock failure, regardless of whether or not the error appears in the log.This cherry-picks the useful commits from #374 to allow the global lock errors to be quietened down, without introducing a new
USERlevel, which we decided wasn't useful for now.Closes #363