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
Gardena/lw/logging #748
Closed
LukasWoodtli
wants to merge
14
commits into
eclipse-wakaama:main
from
husqvarnagroup:gardena/lw/logging
Closed
Gardena/lw/logging #748
LukasWoodtli
wants to merge
14
commits into
eclipse-wakaama:main
from
husqvarnagroup:gardena/lw/logging
Conversation
This file contains 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
LukasWoodtli
force-pushed
the
gardena/lw/logging
branch
3 times, most recently
from
January 29, 2024 10:26
dc97069
to
9306adf
Compare
All the logging used "\r\n" as line ending characters. This is kept for Windows but it is changed to "\n" on all other systems.
The tests check if the expected output for logging is produced.
Some string format specifiers need adjustments for modern C.
The handler function defines how the log messages are formatted. It can be used for future customization.
The custom handler function can be used to overwrite the defalut log message handler. It is used to format the message and to define where it is written to. Also filtering can be applied.
Additional macros are now used to allow to log to a specific level. The default log level is 'debug'.
The macros for logging URI's is simplified and improved.
The logging level can now be set with a proprocessor define at compile time. This helps to reduce the amount of logging messages that are present in the final binary.
There was some unnecessary macro magic with token concatenation. There are also legacy logging macros (without a log level) that are grouped together in the code for better readability.
A function is provided that converts an URI to a string. This string can be provided as argument to other available logging functions.
The default logging macros (`LOG_DBG` and related) allow now the use of arguments. The support is limited to the case, when the format string is a literal. This is due to limitations __VA_ARGS__ in C11.
The important logging functionality was docummented.
The changed code was reformatted with `git clang-format`.
A function was introduced for the logging text formatting to reduce the memory footprint.
LukasWoodtli
force-pushed
the
gardena/lw/logging
branch
from
March 5, 2024 14:29
9306adf
to
c5e07eb
Compare
Check this instead #766 |
Superseeded by #766 |
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.
Improve logging functionality:
Out of scope / do later: