feat(mw/log): add Linux syslog backend for LogMode::kSystem - #271
Draft
btirunagaru wants to merge 1 commit into
Draft
feat(mw/log): add Linux syslog backend for LogMode::kSystem#271btirunagaru wants to merge 1 commit into
btirunagaru wants to merge 1 commit into
Conversation
Adds a Linux syslog mw::log backend that fills the LogMode::kSystem
slot on Linux (HGY aarch64 and x86 host), mirroring the existing QNX
slog backend exactly. slog is target_compatible_with os:qnx and this
new backend is target_compatible_with os:linux, so exactly one
compiles per build and both can safely reuse the same kSystem slot
without any LogMode/dispatch changes.
- score/mw/log/detail/syslog/syslog_backend.{h,cpp}: SyslogBackend,
a Backend implementation whose FlushSlot formats
"appid,ctxid: payload" and forwards to
score::os::Syslog::syslog() at a severity mapped from mw::log's
LogLevel (kFatal->LOG_CRIT, kError->LOG_ERR, kWarn->LOG_WARNING,
kInfo->LOG_INFO, kDebug/kVerbose->LOG_DEBUG); Init() calls
openlog(app_id, LOG_PID|LOG_NDELAY, LOG_USER).
- score/mw/log/detail/syslog/syslog_recorder_factory.{h,cpp}: CRTP
SyslogRecorderFactory wiring a TextRecorder over SyslogBackend,
using score::os::Syslog::Default() for the real OS wrapper.
- score/mw/log/detail/syslog/{syslog_backend_test,
syslog_recorder_factory_test}.cpp: unit tests against
@score_baselibs//score/os/mocklib:syslog_mock.
- score/mw/log/backend/syslog_registrant.cpp: registers
CreateSyslogRecorder against LogMode::kSystem via
BackendRegistrant, mirroring slog_registrant.cpp.
- score/mw/log/backend/BUILD: new syslog cc_library
(target_compatible_with os:linux, alwayslink), plus the
detail/syslog BUILD for syslog_backend/syslog_recorder_factory.
Depends on the companion score::os::Syslog OS wrapper contributed to
the baselibs component (@score_baselibs//score/os:syslog).
Signed-off-by: Bharath Tirunagaru <bharatht@qti.qualcomm.com>
btirunagaru
requested a deployment
to
workflow-approval
August 21, 2026 19:47 — with
GitHub Actions
Waiting
btirunagaru
requested a deployment
to
workflow-approval
August 21, 2026 19:47 — with
GitHub Actions
Waiting
btirunagaru
requested a deployment
to
workflow-approval
August 21, 2026 19:47 — with
GitHub Actions
Waiting
btirunagaru
requested a deployment
to
workflow-approval
August 21, 2026 19:47 — with
GitHub Actions
Waiting
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
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.
Description
Adds a Linux syslog(3) backend for mw::log's LogMode::kSystem slot
(SyslogBackend + SyslogRecorderFactory + BackendRegistrant), following
the existing QNX slog backend's design. Includes unit tests against
score_baselibs//score/os/mocklib:syslog_mock covering log-level to
syslog-priority mapping and slot lifecycle.
Depends on the companion score::os::Syslog OS wrapper contributed to
baselibs (eclipse-score/baselibs#501,
@score_baselibs//score/os:syslog) — should merge/release together.
Related ticket
closes #270
Relates to eclipse-score/baselibs#501, implemented in eclipse-score/baselibs#502