From 9501e0d3d4a6562a57a162ff9e2c561930449729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Mon, 25 May 2026 10:13:38 +0200 Subject: [PATCH 1/6] MAINTENANCE.md: mention that documentation is here MAINTENANCE.md contained obsolete information that no docs are available yet. --- MAINTENANCE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTENANCE.md b/MAINTENANCE.md index fa44f6a3..d96589db 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -5,7 +5,7 @@ other information / procedures useful for maintainers. It is heavily inspired by ## Documentation -TODO (no docs written yet) +Comprehensive Sphinx-compatible documentation lives at /docs. Note: Due to API compatibility, cpp-driver docs apply to cpp-rs-driver in general. Though, some discrepancies should be well-documented in cpp-rs-driver (some of them are already mentioned in `cassandra.h`). ## Version bump commit From 868fe60663bc5d9c54b0b280300f078cb7bf86de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Mon, 25 May 2026 10:14:27 +0200 Subject: [PATCH 2/6] CI: pass RUST_LOG=trace to testing This will improve debuggability. --- .github/workflows/build-lint-and-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-lint-and-test.yml b/.github/workflows/build-lint-and-test.yml index 87b885ee..3d1c3293 100644 --- a/.github/workflows/build-lint-and-test.yml +++ b/.github/workflows/build-lint-and-test.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + RUST_LOG: trace # Should include `INTEGRATION_TEST_BIN` from the `Makefile` # TODO: Remove `build/libscylla-cpp-driver.*` after https://github.com/scylladb/cpp-rs-driver/issues/164 is fixed. INTEGRATION_TEST_BIN: | From c3a1c0ec2be1bf6b13634d37296d98285243c20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Mon, 25 May 2026 13:54:21 +0200 Subject: [PATCH 3/6] CI: pass RUST_BACKTRACE=full to testing This will improve debuggability. --- .github/workflows/build-lint-and-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-lint-and-test.yml b/.github/workflows/build-lint-and-test.yml index 3d1c3293..4a623f58 100644 --- a/.github/workflows/build-lint-and-test.yml +++ b/.github/workflows/build-lint-and-test.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + RUST_BACKTRACE: full RUST_LOG: trace # Should include `INTEGRATION_TEST_BIN` from the `Makefile` # TODO: Remove `build/libscylla-cpp-driver.*` after https://github.com/scylladb/cpp-rs-driver/issues/164 is fixed. From 6b9b54542e779eaddf7253b373537c16aa2bc890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Mon, 25 May 2026 10:56:29 +0200 Subject: [PATCH 4/6] gtest IT: print logs to stderr unconditionally The C++ integration tests used to redirect logs to a file. In CI, this made debugging harder, especially in case of an abort. Now the test Logger also passes the logs to stderr, ensuring the output is visible in real-time. --- tests/src/integration/logger.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/src/integration/logger.cpp b/tests/src/integration/logger.cpp index d78b982b..1fb2f08c 100644 --- a/tests/src/integration/logger.cpp +++ b/tests/src/integration/logger.cpp @@ -125,7 +125,11 @@ void Logger::log(const CassLogMessage* log, void* data) { // Create the formatted log message and output to the file std::string severity = cass_log_level_string(log->severity); logger->output_ << date.str() << " " << time.str() << " " << severity << ": " << message << " (" - << log->file << ":" << log->line << ") " << std::endl; + << log->file << ":" << log->line << ") " << std::endl; + + // Also log to stderr so that CI output captures driver logs in real-time. + std::cerr << log->time_ms << " [" << severity << "] (" + << log->file << ":" << log->line << ") " << message << std::endl; // Determine if the log message matches any of the criteria for (std::vector::const_iterator iterator = logger->search_criteria_.begin(); From 2db8a26b20ad3b257a90eba6a7e296dd93903bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Mon, 25 May 2026 10:56:56 +0200 Subject: [PATCH 5/6] gtest IT: colorize stderr log output Color the severity level and dim the target:line when stderr is a TTY. Uses the same palette as the Rust tracing subscriber (magenta TRACE, blue DEBUG, green INFO, yellow WARN, red ERROR). --- tests/src/integration/logger.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/src/integration/logger.cpp b/tests/src/integration/logger.cpp index 1fb2f08c..ae7f036c 100644 --- a/tests/src/integration/logger.cpp +++ b/tests/src/integration/logger.cpp @@ -32,9 +32,13 @@ using namespace test::driver; #ifdef _WIN32 #define FILE_MODE 0 #define LOCALTIME(tm, time) localtime_s(tm, time) +#include +#define IS_STDERR_TTY() _isatty(_fileno(stderr)) #else #define FILE_MODE S_IRWXU | S_IRWXG | S_IROTH #define LOCALTIME(tm, time) localtime_r(time, tm) +#include +#define IS_STDERR_TTY() isatty(STDERR_FILENO) #endif Logger::Logger() @@ -128,8 +132,24 @@ void Logger::log(const CassLogMessage* log, void* data) { << log->file << ":" << log->line << ") " << std::endl; // Also log to stderr so that CI output captures driver logs in real-time. - std::cerr << log->time_ms << " [" << severity << "] (" - << log->file << ":" << log->line << ") " << message << std::endl; + static bool use_color = IS_STDERR_TTY(); + const char* color = ""; + const char* reset = ""; + const char* dim = ""; + if (use_color) { + reset = "\033[0m"; + dim = "\033[2m"; + switch (log->severity) { + case CASS_LOG_TRACE: color = "\033[35m"; break; + case CASS_LOG_DEBUG: color = "\033[34m"; break; + case CASS_LOG_INFO: color = "\033[32m"; break; + case CASS_LOG_WARN: color = "\033[33m"; break; + default: color = "\033[31m"; break; + } + } + std::cerr << log->time_ms << " [" << color << severity << reset << "] " + << dim << "(" << log->file << ":" << log->line << ")" << reset + << " " << message << std::endl; // Determine if the log message matches any of the criteria for (std::vector::const_iterator iterator = logger->search_criteria_.begin(); From 7ffd09318df45f509fed30747c4146ee0656f93e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Mon, 25 May 2026 10:57:24 +0200 Subject: [PATCH 6/6] gtest IT: use ISO 8601 timestamps in logs Format the timestamp as UTC ISO 8601 with millisecond precision (e.g. 2026-05-25T08:35:04.515Z), matching the format used by the Rust tracing subscriber. --- tests/src/integration/logger.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/src/integration/logger.cpp b/tests/src/integration/logger.cpp index ae7f036c..b2c95b0a 100644 --- a/tests/src/integration/logger.cpp +++ b/tests/src/integration/logger.cpp @@ -32,11 +32,13 @@ using namespace test::driver; #ifdef _WIN32 #define FILE_MODE 0 #define LOCALTIME(tm, time) localtime_s(tm, time) +#define GMTIME(tm, time) gmtime_s(tm, time) #include #define IS_STDERR_TTY() _isatty(_fileno(stderr)) #else #define FILE_MODE S_IRWXU | S_IRWXG | S_IROTH #define LOCALTIME(tm, time) localtime_r(time, tm) +#define GMTIME(tm, time) gmtime_r(time, tm) #include #define IS_STDERR_TTY() isatty(STDERR_FILENO) #endif @@ -147,7 +149,14 @@ void Logger::log(const CassLogMessage* log, void* data) { default: color = "\033[31m"; break; } } - std::cerr << log->time_ms << " [" << color << severity << reset << "] " + cass_uint64_t const epoch_secs = log->time_ms / 1000; + unsigned short const ms = log->time_ms % 1000; + time_t const raw = static_cast(epoch_secs); + struct tm utc; + GMTIME(&utc, &raw); + char ts[24]; + strftime(ts, sizeof(ts), "%Y-%m-%dT%H:%M:%S", &utc); + std::cerr << ts << "." << std::setfill('0') << std::setw(3) << ms << "Z" << " [" << color << severity << reset << "] " << dim << "(" << log->file << ":" << log->line << ")" << reset << " " << message << std::endl;