diff --git a/cpp/src/io/comp/nvcomp_adapter.cpp b/cpp/src/io/comp/nvcomp_adapter.cpp index 3a4e315348c..ac81dd421fa 100644 --- a/cpp/src/io/comp/nvcomp_adapter.cpp +++ b/cpp/src/io/comp/nvcomp_adapter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024, NVIDIA CORPORATION. + * Copyright (c) 2022-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -416,11 +416,11 @@ std::optional is_compression_disabled(compression_type compression, memo_map_lock.unlock(); if (reason.has_value()) { - CUDF_LOG_INFO("nvCOMP is disabled for {} compression; reason: {}", + CUDF_LOG_INFO("nvCOMP is disabled for %s compression; reason: %s", compression_type_name(compression), reason.value()); } else { - CUDF_LOG_INFO("nvCOMP is enabled for {} compression", compression_type_name(compression)); + CUDF_LOG_INFO("nvCOMP is enabled for %s compression", compression_type_name(compression)); } return reason; @@ -445,11 +445,11 @@ std::optional is_decompression_disabled(compression_type compressio memo_map_lock.unlock(); if (reason.has_value()) { - CUDF_LOG_INFO("nvCOMP is disabled for {} decompression; reason: {}", + CUDF_LOG_INFO("nvCOMP is disabled for %s decompression; reason: %s", compression_type_name(compression), reason.value()); } else { - CUDF_LOG_INFO("nvCOMP is enabled for {} decompression", compression_type_name(compression)); + CUDF_LOG_INFO("nvCOMP is enabled for %s decompression", compression_type_name(compression)); } return reason; diff --git a/cpp/src/io/csv/reader_impl.cu b/cpp/src/io/csv/reader_impl.cu index e05353ee822..0d51526d925 100644 --- a/cpp/src/io/csv/reader_impl.cu +++ b/cpp/src/io/csv/reader_impl.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2024, NVIDIA CORPORATION. + * Copyright (c) 2019-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -771,7 +771,7 @@ table_with_metadata read_csv(cudf::io::datasource* source, if (!reader_opts.is_enabled_mangle_dupe_cols()) { for (auto& col_name : column_names) { if (++col_names_counts[col_name] > 1) { - CUDF_LOG_WARN("Multiple columns with name {}; only the first appearance is parsed", + CUDF_LOG_WARN("Multiple columns with name %s; only the first appearance is parsed", col_name); auto const idx = &col_name - column_names.data(); diff --git a/cpp/src/io/parquet/writer_impl.cu b/cpp/src/io/parquet/writer_impl.cu index 6b1a20701f9..77924ac0f35 100644 --- a/cpp/src/io/parquet/writer_impl.cu +++ b/cpp/src/io/parquet/writer_impl.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2024, NVIDIA CORPORATION. + * Copyright (c) 2019-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -719,7 +719,7 @@ std::vector construct_parquet_schema_tree( // all others default: CUDF_LOG_WARN( - "Unsupported page encoding requested: {}; the requested encoding will be ignored", + "Unsupported page encoding requested: %d; the requested encoding will be ignored", static_cast(col_meta.get_encoding())); return; } diff --git a/cpp/src/io/utilities/data_sink.cpp b/cpp/src/io/utilities/data_sink.cpp index dfa5d46cf48..975206646c6 100644 --- a/cpp/src/io/utilities/data_sink.cpp +++ b/cpp/src/io/utilities/data_sink.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2024, NVIDIA CORPORATION. + * Copyright (c) 2020-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ class file_sink : public data_sink { if (cufile_integration::is_kvikio_enabled()) { cufile_integration::set_up_kvikio(); _kvikio_file = kvikio::FileHandle(filepath, "w"); - CUDF_LOG_INFO("Writing a file using kvikIO, with compatibility mode {}.", + CUDF_LOG_INFO("Writing a file using kvikIO, with compatibility mode %s.", _kvikio_file.is_compat_mode_preferred() ? "on" : "off"); } else { _cufile_out = detail::make_cufile_output(filepath); diff --git a/cpp/src/io/utilities/datasource.cpp b/cpp/src/io/utilities/datasource.cpp index 38dedcc2627..87b3c6facdf 100644 --- a/cpp/src/io/utilities/datasource.cpp +++ b/cpp/src/io/utilities/datasource.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2024, NVIDIA CORPORATION. + * Copyright (c) 2019-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,7 @@ class file_source : public datasource { if (cufile_integration::is_kvikio_enabled()) { cufile_integration::set_up_kvikio(); _kvikio_file = kvikio::FileHandle(filepath); - CUDF_LOG_INFO("Reading a file using kvikIO, with compatibility mode {}.", + CUDF_LOG_INFO("Reading a file using kvikIO, with compatibility mode %s.", _kvikio_file.is_compat_mode_preferred() ? "on" : "off"); } else { _cufile_in = detail::make_cufile_input(filepath); @@ -230,7 +230,7 @@ class memory_mapped_source : public file_source { { if (_map_addr != nullptr) { auto const result = munmap(_map_addr, _map_size); - if (result != 0) { CUDF_LOG_WARN("munmap failed with {}", result); } + if (result != 0) { CUDF_LOG_WARN("munmap failed with %d", result); } _map_addr = nullptr; } } diff --git a/cpp/src/io/utilities/getenv_or.hpp b/cpp/src/io/utilities/getenv_or.hpp index b9613428418..acfd2221797 100644 --- a/cpp/src/io/utilities/getenv_or.hpp +++ b/cpp/src/io/utilities/getenv_or.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, NVIDIA CORPORATION. + * Copyright (c) 2024-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,10 +32,17 @@ T getenv_or(std::string_view env_var_name, T default_val) { auto const env_val = std::getenv(env_var_name.data()); if (env_val != nullptr) { - CUDF_LOG_INFO("Environment variable {} read as {}", env_var_name, env_val); + CUDF_LOG_INFO("Environment variable %.*s read as %s", + static_cast(env_var_name.length()), + env_var_name.data(), + env_val); } else { - CUDF_LOG_INFO( - "Environment variable {} is not set, using default value {}", env_var_name, default_val); + std::stringstream ss; + ss << default_val; + CUDF_LOG_INFO("Environment variable %.*s is not set, using default value %s", + static_cast(env_var_name.length()), + env_var_name.data(), + ss.str()); } if (env_val == nullptr) { return default_val; } diff --git a/cpp/src/utilities/host_memory.cpp b/cpp/src/utilities/host_memory.cpp index 4196523d211..73c4567d3a4 100644 --- a/cpp/src/utilities/host_memory.cpp +++ b/cpp/src/utilities/host_memory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, NVIDIA CORPORATION. + * Copyright (c) 2024-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ class fixed_pinned_pool_memory_resource { pool_size_{rmm::align_up(size, rmm::CUDA_ALLOCATION_ALIGNMENT)}, pool_{new host_pooled_mr(upstream_mr_, pool_size_, pool_size_)} { - CUDF_LOG_INFO("Pinned pool size = {}", pool_size_); + CUDF_LOG_INFO("Pinned pool size = %zu", pool_size_); // Allocate full size from the pinned pool to figure out the beginning and end address pool_begin_ = pool_->allocate_async(pool_size_, stream_); diff --git a/cpp/src/utilities/stream_pool.cpp b/cpp/src/utilities/stream_pool.cpp index b0f2d8c0637..80364885980 100644 --- a/cpp/src/utilities/stream_pool.cpp +++ b/cpp/src/utilities/stream_pool.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, NVIDIA CORPORATION. + * Copyright (c) 2023-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -129,7 +129,8 @@ class rmm_cuda_stream_pool : public cuda_stream_pool { std::vector get_streams(std::size_t count) override { if (count > STREAM_POOL_SIZE) { - CUDF_LOG_WARN("get_streams called with count ({}) > pool size ({})", count, STREAM_POOL_SIZE); + CUDF_LOG_WARN( + "get_streams called with count (%zu) > pool size (%zu)", count, STREAM_POOL_SIZE); } auto streams = std::vector(); for (uint32_t i = 0; i < count; i++) {