-
Notifications
You must be signed in to change notification settings - Fork 3
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
Pull Logging and Logic Improvements #127
Conversation
Fix log type keywords
This concludes the changes I wanted to make before testing. |
Known mistakes:
|
Tested the correctness of the logs for all endpoints except for For pure getters, i.e. those handlers that only log on the level The previous commit resulted from this testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For human-readability, I think it is necessary to add - start
because it's very hard to remember the message format to look for until you reach the message with - finish
(then you can backtrack to the corresponding "start" message.
Should be tested with the web clients to make sure they can still parse the server responses.
I agree. Also: Should it be "finish" instead of "finished"? Somewhat related: Should the error messages after |
The ci is failing due to some build setup issue, specifically when trying to install |
Pipeline works again, added apt update before any step where apt packages are installed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the code documentation, think about whether libbidib's doxygen setup could be reused.
I'd cover that in a future issue/pr, not in this one |
#127 (comment) somehow I cannot answer to that comment/change request. Not sure why. I'm adjusting the message in a way similar to the proposed message. |
Alright, the "Improve Logging" branch has grown to incorporate a bit more than just logging improvements.
The biggest changes are in the request handlers. I moved the validation around such that they follow a pattern:
The "log request start" is also outfitted with data about request parameters, such that one can trace after the fact what request is which, if there are multiple trains/users active. Furthermore, the "log request finished" is the exact same as the "log request start" if possible, just with a "finished" at the end. This makes it relatively easy to trace when a request came in and when it was finished.
Since I already had to touch most of the handlers and some related functions, I made some adjustments to them, mostly regarding validation and formatting. There are also some notes I made on areas of the codebase that may need some change but where we should really discuss it first.
This is a bit of a bigger change, but IMO prepares us to tackle the API rework.