Skip to content

DELIA-70109: Updates to ethanlog client library#426

Open
bgray-sky wants to merge 5 commits intordkcentral:developfrom
bgray-sky:DELIA-70109_updates_to_ethanlog_client_library
Open

DELIA-70109: Updates to ethanlog client library#426
bgray-sky wants to merge 5 commits intordkcentral:developfrom
bgray-sky:DELIA-70109_updates_to_ethanlog_client_library

Conversation

@bgray-sky
Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (doesn't fit into the above categories - e.g. documentation updates)

Requires Bitbake Recipe changes?

  • The base Bitbake recipe (meta-rdk-ext/recipes-containers/dobby/dobby.bb) must be modified to support the changes in this PR (beyond updating SRC_REV)

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.
Copilot AI review requested due to automatic review settings April 2, 2026 15:21
@bgray-sky bgray-sky changed the title Delia 70109 updates to ethanlog client library DELIA-70109 updates to ethanlog client library Apr 2, 2026
@bgray-sky bgray-sky changed the title DELIA-70109 updates to ethanlog client library DELIA-70109: Updates to ethanlog client library Apr 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 libethanlog with a new C++ implementation that can wrap long log messages and optionally queue messages on EAGAIN/EWOULDBLOCK.
  • Update libethanlog CMake target to build ethanlog.cpp and 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.

Comment thread plugins/EthanLog/source/EthanLogLoop.cpp
Comment thread plugins/EthanLog/source/EthanLogLoop.cpp
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp Outdated
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp Outdated
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp Outdated
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp Outdated
Copilot AI review requested due to automatic review settings April 2, 2026 18:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread plugins/EthanLog/source/EthanLogLoop.cpp
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp Outdated
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp Outdated
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp
Comment thread plugins/EthanLog/client/lib/source/ethanlog.cpp
Comment thread plugins/EthanLog/client/lib/CMakeLists.txt
totalWritten += written;
}

return totalWritten;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Overflowed return value

"totalWritten", which might have underflowed, is returned from the function.

Medium Impact, CWE-190
INTEGER_OVERFLOW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants