dev: Usage of InternalLogger and key values#135
Merged
Conversation
4294b2c to
9efa29d
Compare
KonradBreitsprecherBkd
requested changes
Oct 25, 2024
Contributor
KonradBreitsprecherBkd
left a comment
There was a problem hiding this comment.
This feature will add quite some benefit in debugging SIL Kit systems in the future!
I see two major points that needs some refactoring:
- Condense the logging "keys" to a seperate header which prevents typos and an overview of the available keys.
- Using an
unordered_mapfor the storage of key+value seems reasonable for any subsequent analysis, but here it has a disadvantage: When collecting the pairs in theServiceDescriptor::to_keyValues()and printing to the (stdout or file) log inKeyValuesToJsonString, we lose control over the order of pairs. E.g. in the Send / Recv logs the NetworkName should be at the beginning for readability. Astd::mapalso doesn't help, as we want manual control over the order. Also, from what I see we never need the access by key, so we actually don't need the map. I suggest switching to astd::vector<std::pair<std::string, std::string>>, so we can define the iteration order via the insertion order.
More minor findings:
- Where used, double check if
ILoggerInternalis really needed overILogger. This got a litte bit confusing. Consider renaming toIStructuredLoggerInternalthat it's more clear that this code part uses the structured logging. - Few suggestions for SetMessage() wording
- Cleanup commented out code
6d4e828 to
c94e0fe
Compare
KonradBreitsprecherBkd
requested changes
Oct 30, 2024
Contributor
KonradBreitsprecherBkd
left a comment
There was a problem hiding this comment.
Two more things as discussed:
- No escaping in KeyValuesToSimpleString
- MessageBuffer Ser/Des for std::pair instead of std:vector<pair...
KonradBreitsprecherBkd
approved these changes
Oct 31, 2024
Contributor
KonradBreitsprecherBkd
left a comment
There was a problem hiding this comment.
LGTM now!
…nd sim step start/stop
e89e80c to
53460c5
Compare
KonradBreitsprecherBkd
requested changes
Nov 6, 2024
Contributor
KonradBreitsprecherBkd
left a comment
There was a problem hiding this comment.
RpcClient and Server were logging the wrong labels.
MariusBgm
reviewed
Nov 7, 2024
MariusBgm
reviewed
Nov 7, 2024
MariusBgm
requested changes
Nov 7, 2024
Collaborator
MariusBgm
left a comment
There was a problem hiding this comment.
We should discuss potential performance issues before merging
improve performance, move for-loops behind logging check
MariusBgm
approved these changes
Nov 8, 2024
SimplyLMK
pushed a commit
to SimplyLMK/sil-kit
that referenced
this pull request
Oct 23, 2025
* SILKit-1607: Usage of InternalLogger and key values
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.
Subject
Usage of the internal logger API and key values.
Description
Selected logmessages are switch to use the new internal Logger API. Values, which bevor where integrated in the message string, are now handled as key values.
Instructions for review / testing
Developer checklist (address before review)