RCBC-550: Access C++ log level using C++ core API instead of spdlog's default logger#229
Open
DemetrisChr wants to merge 1 commit into
Open
RCBC-550: Access C++ log level using C++ core API instead of spdlog's default logger#229DemetrisChr wants to merge 1 commit into
DemetrisChr wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Ruby client’s native logger integration to query/set log levels via the Couchbase C++ core logger API (instead of spdlog’s default logger), and adds a regression test for RCBC-550 covering connect-after-fork behavior.
Changes:
- Switch
Backend.set_log_level/Backend.get_log_levelto usecore::logger::{set_log_levels,get_lowest_log_level}. - Add a regression test that forks a process and connects/disconnects in the child.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
test/couchbase_test.rb |
Adds a fork-based regression test for RCBC-550. |
ext/rcb_logger.cxx |
Uses C++ core logger API for log-level set/get instead of spdlog global logger. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dce1c28 to
08454d6
Compare
a17e6fc to
bfa2d37
Compare
avsej
approved these changes
Jun 22, 2026
bfa2d37 to
11aa024
Compare
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.
Motivation
Backend.get_log_levelresults in a segmentation fault when used after a process fork. The reason for that is that we get the log level from spdlog's default logger, which is destroyed by the C++ SDK after the fork event (the SDK doesn't actually use spdlog's default logger). We should use the logger API provided by the C++ SDK instead of using thespdlogAPI directly. This affectedCluster#connectwhen using the defaultThresholdLoggerTraceras it callsBackend.get_log_levelChange
spdlogAPI.