This is an automated email from the ASF dual-hosted git repository.

pitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new ac7d3fabaa0 GH-47465: [C++] Mark the glog backend for deprecation 
(#55632)
ac7d3fabaa0 is described below

commit ac7d3fabaa089001627b32cb6f33789e0919d4df
Author: Atharva Potdar <[email protected]>
AuthorDate: Thu Nov 19 22:22:41 2026 +0530

    GH-47465: [C++] Mark the glog backend for deprecation (#55632)
    
    ### Rationale for this change
    As discussed in GH-47465, glog is no longer maintained, therefore this PR 
deprecates the glog backend in Apache Arrow.
    
    ### What changes are included in this PR?
    - Mark `ARROW_USE_GLOG` CMake option as deprecated and emit a warning for it
    - Mark `GLOG` as deprecated in the C++ build docs
    - Deprecate `ArrowLog::InstallFailureSignalHandler()` and 
`ArrowLog::UninstallSignalAction()` and suppress the deprecation warnings for 
their calls in `acero_main.cc` and `test_integration_client.cc`
    
    ### Are these changes tested?
    Yes, I tested them locally with CMake/Ninja.
    
    ### Are there any user-facing changes?
    
    Yes, `ARROW_USE_GLOG`, `ArrowLog::InstallFailureSignalHandler()` and 
`UninstallSignalAction()` now emit deprecation warnings.
    
    ### Was AI used for this PR?
    
    Yes, Copilot's code review caught a macro for deprecation that I hadn't 
used. I accepted its suggestion, and the commit that added it has Copilot as a 
co-author.
    
    **PR code and description written by:**
    
    - [x] Human
    - [x] AI
    
    **Reviewed before submission by:**
    
    - [x] Human
    - [ ] AI
    - [ ] Not reviewed
    
    * GitHub Issue: #47465
    
    Lead-authored-by: atharva-potdar <[email protected]>
    Co-authored-by: Atharva Potdar <[email protected]>
    Co-authored-by: Copilot Autofix powered by AI 
<[email protected]>
    Signed-off-by: Antoine Pitrou <[email protected]>
---
 cpp/cmake_modules/DefineOptions.cmake                            | 9 +++++++--
 .../arrow/flight/integration_tests/test_integration_client.cc    | 4 ++++
 cpp/src/arrow/flight/sql/example/acero_main.cc                   | 2 ++
 cpp/src/arrow/util/logging.cc                                    | 4 ++++
 cpp/src/arrow/util/logging.h                                     | 4 ++++
 docs/source/developers/cpp/building.rst                          | 2 +-
 6 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/cpp/cmake_modules/DefineOptions.cmake 
b/cpp/cmake_modules/DefineOptions.cmake
index b58ab3cd381..479af438bf0 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/cpp/src/arrow/flight/integration_tests/test_integration_client.cc 
b/cpp/src/arrow/flight/integration_tests/test_integration_client.cc
index f39a4f04eb7..b6c9ad903e9 100644
--- a/cpp/src/arrow/flight/integration_tests/test_integration_client.cc
+++ b/cpp/src/arrow/flight/integration_tests/test_integration_client.cc
@@ -217,7 +217,9 @@ 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);
@@ -240,6 +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 111bebcbf0f..b36dc20c44a 100644
--- a/cpp/src/arrow/flight/sql/example/acero_main.cc
+++ b/cpp/src/arrow/flight/sql/example/acero_main.cc
@@ -56,7 +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);
 
diff --git a/cpp/src/arrow/util/logging.cc b/cpp/src/arrow/util/logging.cc
index 6c7a82ec08d..e1e3f9eec63 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 460888f6d75..069a98f74da 100644
--- a/cpp/src/arrow/util/logging.h
+++ b/cpp/src/arrow/util/logging.h
@@ -189,9 +189,13 @@ 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.
diff --git a/docs/source/developers/cpp/building.rst 
b/docs/source/developers/cpp/building.rst
index 7c52e4b60a6..8d946972ebb 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

Reply via email to