DELIA-70109: Updates to ethanlog client library#426
DELIA-70109: Updates to ethanlog client library#426bgray-sky wants to merge 5 commits intordkcentral:developfrom
Conversation
Updated the logging library to support log line wrapping and also queuing of messages if the pipe is full. Both options are disabled by default, but can be enabled via environment variables.
There was a problem hiding this comment.
Pull request overview
Rewrites the libethanlog client library to support optional log-line wrapping and buffering/queuing during pipe backpressure, and updates build configuration to compile the new C++ implementation.
Changes:
- Replace the legacy C implementation of
libethanlogwith a new C++ implementation that can wrap long log messages and optionally queue messages on EAGAIN/EWOULDBLOCK. - Update
libethanlogCMake target to buildethanlog.cppand bump the library version. - Adjust the EthanLog plugin’s pipe-size
fcntl(F_SETPIPE_SZ, ...)return-value check.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| plugins/EthanLog/source/EthanLogLoop.cpp | Updates pipe-size configuration check for the logging pipe. |
| plugins/EthanLog/client/lib/source/ethanlog.cpp | New C++ libethanlog implementation with wrapping + queuing behavior. |
| plugins/EthanLog/client/lib/source/ethanlog.c | Removes the legacy C implementation. |
| plugins/EthanLog/client/lib/CMakeLists.txt | Switches library source to C++ and bumps the version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
the library at the same time.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| totalWritten += written; | ||
| } | ||
|
|
||
| return totalWritten; |
There was a problem hiding this comment.
Coverity Issue - Overflowed return value
"totalWritten", which might have underflowed, is returned from the function.
Medium Impact, CWE-190
INTEGER_OVERFLOW
Description
I rewrite of the ethanlog client library to support optional log line wrapping and internal queuing of messages when experiencing back pressure.
Note that this only affects the libethanlog client library, not the Dobby plugin that receives the log messages.
Ticket DELIA-70109
Test Procedure
Spawn a container with the EthanLog plugin enabled, and use the libethanlog client library to send messages of different lengths and loads.
Type of Change
Requires Bitbake Recipe changes?
meta-rdk-ext/recipes-containers/dobby/dobby.bb) must be modified to support the changes in this PR (beyond updatingSRC_REV)