From b505a61e2377a9f078ad05be76e2d30520cfdf0f Mon Sep 17 00:00:00 2001 From: atharva-potdar Date: Mon, 16 Nov 2026 16:17:50 +0530 Subject: [PATCH 1/4] GH-47465: [CMake][Docs] Mark the glog backend for deprecation --- cpp/cmake_modules/DefineOptions.cmake | 9 +++++++-- docs/source/developers/cpp/building.rst | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cpp/cmake_modules/DefineOptions.cmake b/cpp/cmake_modules/DefineOptions.cmake index b58ab3cd3810..479af438bf06 100644 --- a/cpp/cmake_modules/DefineOptions.cmake +++ b/cpp/cmake_modules/DefineOptions.cmake @@ -519,8 +519,8 @@ takes precedence over ccache if a storage backend is configured" ON) define_option(ARROW_ZSTD_USE_SHARED "Rely on zstd shared libraries where relevant" ${ARROW_DEPENDENCY_USE_SHARED}) - define_option(ARROW_USE_GLOG "Build libraries with glog support for pluggable logging" - OFF) + define_option(ARROW_USE_GLOG "Build libraries with glog support for pluggable logging;\ +(This is a deprecated option and will be removed in a future release.)" OFF) define_option(ARROW_WITH_BACKTRACE "Build with backtrace support" ON) @@ -703,6 +703,11 @@ macro(config_summary_message) if(ARROW_PYTHON) message(WARNING "ARROW_PYTHON is deprecated. Use CMake presets instead.") endif() + + if(ARROW_USE_GLOG) + message(DEPRECATION "ARROW_USE_GLOG is deprecated and will be removed in a future release." + ) + endif() endmacro() macro(config_summary_json) diff --git a/docs/source/developers/cpp/building.rst b/docs/source/developers/cpp/building.rst index 8e40b047fd53..72fe5574d63a 100644 --- a/docs/source/developers/cpp/building.rst +++ b/docs/source/developers/cpp/building.rst @@ -494,7 +494,7 @@ The build system supports a number of third-party dependencies * ``BZip2``: for data compression * ``c-ares``: a dependency of gRPC * ``gflags``: for command line utilities (formerly Googleflags) - * ``GLOG``: for logging + * ``GLOG``: for logging (deprecated) * ``google_cloud_cpp_storage``: for Google Cloud Storage support, requires system cURL and can use the ``BUNDLED`` method described below * ``gRPC``: for remote procedure calls From 37ec41f436511a21a0ac38740dd915c7319da029 Mon Sep 17 00:00:00 2001 From: atharva-potdar Date: Mon, 16 Nov 2026 16:37:04 +0530 Subject: [PATCH 2/4] GH-47465: [C++] Deprecate glog signal handler helpers in ArrowLog --- .../arrow/flight/integration_tests/test_integration_client.cc | 3 --- cpp/src/arrow/flight/sql/example/acero_main.cc | 1 - cpp/src/arrow/util/logging.cc | 4 ++++ cpp/src/arrow/util/logging.h | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cpp/src/arrow/flight/integration_tests/test_integration_client.cc b/cpp/src/arrow/flight/integration_tests/test_integration_client.cc index f39a4f04eb79..6cbbad8f2f10 100644 --- a/cpp/src/arrow/flight/integration_tests/test_integration_client.cc +++ b/cpp/src/arrow/flight/integration_tests/test_integration_client.cc @@ -217,8 +217,6 @@ arrow::Status RunScenario(arrow::flight::integration_tests::Scenario* scenario) } int main(int argc, char** argv) { - arrow::util::ArrowLog::InstallFailureSignalHandler(); - gflags::SetUsageMessage("Integration testing client for Flight."); gflags::ParseCommandLineFlags(&argc, &argv, true); std::shared_ptr scenario; @@ -240,6 +238,5 @@ int main(int argc, char** argv) { } ABORT_NOT_OK(status); - arrow::util::ArrowLog::UninstallSignalAction(); return 0; } diff --git a/cpp/src/arrow/flight/sql/example/acero_main.cc b/cpp/src/arrow/flight/sql/example/acero_main.cc index 111bebcbf0f0..1c9b7891e1a9 100644 --- a/cpp/src/arrow/flight/sql/example/acero_main.cc +++ b/cpp/src/arrow/flight/sql/example/acero_main.cc @@ -56,7 +56,6 @@ int main(int argc, char** argv) { arrow::util::ArrowLog::StartArrowLog("acero-flight-sql-server", arrow::util::ArrowLogLevel::ARROW_INFO); - arrow::util::ArrowLog::InstallFailureSignalHandler(); arrow::Status st = RunMain(FLAGS_location); diff --git a/cpp/src/arrow/util/logging.cc b/cpp/src/arrow/util/logging.cc index 6c7a82ec08d0..e1e3f9eec634 100644 --- a/cpp/src/arrow/util/logging.cc +++ b/cpp/src/arrow/util/logging.cc @@ -187,6 +187,8 @@ void ArrowLog::StartArrowLog(const std::string& app_name, #endif } +ARROW_SUPPRESS_DEPRECATION_WARNING + void ArrowLog::UninstallSignalAction() { #ifdef ARROW_USE_GLOG ARROW_LOG(DEBUG) << "Uninstall signal handlers."; @@ -223,6 +225,8 @@ void ArrowLog::InstallFailureSignalHandler() { #endif } +ARROW_UNSUPPRESS_DEPRECATION_WARNING + bool ArrowLog::IsLevelEnabled(ArrowLogLevel log_level) { return log_level >= severity_threshold_; } diff --git a/cpp/src/arrow/util/logging.h b/cpp/src/arrow/util/logging.h index 460888f6d75e..094bb304a606 100644 --- a/cpp/src/arrow/util/logging.h +++ b/cpp/src/arrow/util/logging.h @@ -189,9 +189,11 @@ class ARROW_EXPORT ArrowLog : public ArrowLogBase { /// Install the failure signal handler to output call stack when crash. /// If glog is not installed, this function won't do anything. + /// \deprecated Deprecated in 27.0.0. GLog support is deprecated. static void InstallFailureSignalHandler(); /// Uninstall the signal actions installed by InstallFailureSignalHandler. + /// \deprecated Deprecated in 27.0.0. GLog support is deprecated. static void UninstallSignalAction(); /// Return whether or not the log level is enabled in current setting. From 9dfd95a61a4e5de9a9d8091080ae2ae0c0485441 Mon Sep 17 00:00:00 2001 From: Atharva Potdar Date: Mon, 16 Nov 2026 16:54:43 +0530 Subject: [PATCH 3/4] Add ARROW_DEPRECATED macro to glog helpers in logging.h Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- cpp/src/arrow/util/logging.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/src/arrow/util/logging.h b/cpp/src/arrow/util/logging.h index 094bb304a606..069a98f74da4 100644 --- a/cpp/src/arrow/util/logging.h +++ b/cpp/src/arrow/util/logging.h @@ -190,10 +190,12 @@ class ARROW_EXPORT ArrowLog : public ArrowLogBase { /// Install the failure signal handler to output call stack when crash. /// If glog is not installed, this function won't do anything. /// \deprecated Deprecated in 27.0.0. GLog support is deprecated. + ARROW_DEPRECATED("Deprecated in 27.0.0. GLog support is deprecated.") static void InstallFailureSignalHandler(); /// Uninstall the signal actions installed by InstallFailureSignalHandler. /// \deprecated Deprecated in 27.0.0. GLog support is deprecated. + ARROW_DEPRECATED("Deprecated in 27.0.0. GLog support is deprecated.") static void UninstallSignalAction(); /// Return whether or not the log level is enabled in current setting. From 72990e287dff67d4f8e8f9fed33953e5889be71e Mon Sep 17 00:00:00 2001 From: atharva-potdar Date: Tue, 17 Nov 2026 14:17:36 +0530 Subject: [PATCH 4/4] Keep ArrowLog signal handler calls and suppress deprecation warnings --- .../flight/integration_tests/test_integration_client.cc | 7 +++++++ cpp/src/arrow/flight/sql/example/acero_main.cc | 3 +++ 2 files changed, 10 insertions(+) diff --git a/cpp/src/arrow/flight/integration_tests/test_integration_client.cc b/cpp/src/arrow/flight/integration_tests/test_integration_client.cc index 6cbbad8f2f10..b6c9ad903e95 100644 --- a/cpp/src/arrow/flight/integration_tests/test_integration_client.cc +++ b/cpp/src/arrow/flight/integration_tests/test_integration_client.cc @@ -217,6 +217,10 @@ arrow::Status RunScenario(arrow::flight::integration_tests::Scenario* scenario) } int main(int argc, char** argv) { + ARROW_SUPPRESS_DEPRECATION_WARNING + arrow::util::ArrowLog::InstallFailureSignalHandler(); + ARROW_UNSUPPRESS_DEPRECATION_WARNING + gflags::SetUsageMessage("Integration testing client for Flight."); gflags::ParseCommandLineFlags(&argc, &argv, true); std::shared_ptr scenario; @@ -238,5 +242,8 @@ int main(int argc, char** argv) { } ABORT_NOT_OK(status); + ARROW_SUPPRESS_DEPRECATION_WARNING + arrow::util::ArrowLog::UninstallSignalAction(); + ARROW_UNSUPPRESS_DEPRECATION_WARNING return 0; } diff --git a/cpp/src/arrow/flight/sql/example/acero_main.cc b/cpp/src/arrow/flight/sql/example/acero_main.cc index 1c9b7891e1a9..b36dc20c44a6 100644 --- a/cpp/src/arrow/flight/sql/example/acero_main.cc +++ b/cpp/src/arrow/flight/sql/example/acero_main.cc @@ -56,6 +56,9 @@ int main(int argc, char** argv) { arrow::util::ArrowLog::StartArrowLog("acero-flight-sql-server", arrow::util::ArrowLogLevel::ARROW_INFO); + ARROW_SUPPRESS_DEPRECATION_WARNING + arrow::util::ArrowLog::InstallFailureSignalHandler(); + ARROW_UNSUPPRESS_DEPRECATION_WARNING arrow::Status st = RunMain(FLAGS_location);