{"id":14855,"library":"rapids-logger","title":"RAPIDS Logger","description":"rapids-logger is a core logging framework within the RAPIDS ecosystem, built around the high-performance C++ `spdlog` library. Its primary goal is to provide project-specific loggers easily, ensuring that custom logging implementations do not leak `spdlog` or `fmt` symbols, thus allowing safe coexistence of different RAPIDS projects in the same environment. While it has Python bindings for packaging, its direct Python API for general-purpose logging is not extensively documented; it primarily serves as the underlying logging mechanism for other RAPIDS Python libraries like `cuML`. The current version is 0.2.3, and releases align with the broader RAPIDS CalVer (YY.MM.PP) versioning scheme for patch releases.","status":"active","version":"0.2.3","language":"en","source_language":"en","source_url":"https://github.com/rapidsai/rapids-logger","tags":["logging","rapids","gpu","c++","performance"],"install":[{"cmd":"pip install rapids-logger","lang":"bash","label":"Stable release"},{"cmd":"conda install -c rapidsai -c conda-forge rapids-logger","lang":"bash","label":"Conda installation (recommended for RAPIDS)"}],"dependencies":[],"imports":[{"note":"rapids-logger is primarily a C++ library. While Python wheels exist, a high-level Python API for direct logger instantiation and use, analogous to Python's `logging` module, is not a primary documented feature. Logging is typically configured through higher-level RAPIDS Python libraries that use `rapids-logger` internally.","wrong":"from rapids_logger import Logger","symbol":"Logger","correct":"N/A (Typically used indirectly)"}],"quickstart":{"code":"# rapids-logger is primarily a C++ library and its direct Python API for general-purpose logging\n# is not a primary documented feature. Python users typically interact with logging\n# through other RAPIDS Python libraries (e.g., cuML) that use rapids-logger internally.\n#\n# Example of configuring logging in cuML (which uses rapids-logger implicitly):\n# import cuml\n# cuml.accel.install(log_level='debug')\n#\n# To see if rapids-logger's C++ components are correctly installed and available via Python bindings:\nimport rapids_logger\nprint(f\"rapids_logger version: {rapids_logger.__version__}\")\n# Further direct interaction would depend on specific, often undocumented, Python bindings.","lang":"python","description":"Due to `rapids-logger` being predominantly a C++ framework, direct Python usage for general logging is not commonly documented. Python users typically configure logging through environment variables or specific API calls provided by higher-level RAPIDS Python libraries (e.g., `cuml.accel.install(log_level='debug')`). The provided quickstart demonstrates checking the installed version and notes the indirect usage pattern."},"warnings":[{"fix":"For Python applications, primarily configure logging via the specific RAPIDS library you are using (e.g., `cuml`, `cudf`) or through environment variables if supported by the upstream RAPIDS library. Do not expect `rapids-logger` to expose a generic Python logging interface.","message":"rapids-logger is fundamentally a C++ library. While Python bindings and wheels are provided, direct high-level Python API for creating and managing loggers (like Python's built-in `logging` module or `loguru`) is not a primary documented feature. Its Python package primarily facilitates its underlying use within other RAPIDS Python libraries.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Update CMakeLists.txt to remove direct `spdlog` and `fmt` dependencies where `rapids-logger` is intended as the logging provider, and integrate `rapids-logger` via `rapids_make_logger` or similar RAPIDS CMake functions. This mainly impacts developers building RAPIDS components from source or extending them in C++.","message":"For C++ projects building within the RAPIDS ecosystem, `rapids-logger` has replaced direct dependencies on `spdlog` and `fmt`. Projects that previously linked directly against `spdlog` or `fmt` for logging may need to update their CMake configurations to use `rapids-logger` instead.","severity":"breaking","affected_versions":"v0.2.1 and later (within RAPIDS CMake projects)"},{"fix":"Verify the source repository (github.com/rapidsai/rapids-logger) and PyPI/Conda package (`rapids-logger` from `rapidsai` channel) to confirm you are using the correct library.","message":"There is an unrelated CI tool also named 'rapids-logger' which is part of the `gha-tools` repository. Ensure you are referencing the correct `rapidsai/rapids-logger` for the logging framework.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Install the package using `pip install rapids-logger` or `conda install -c rapidsai -c conda-forge rapids-logger`. Ensure your Python environment is correctly activated before running your script.","cause":"The `rapids-logger` Python package is not installed in the current environment or the Python environment is not correctly activated.","error":"ModuleNotFoundError: No module named 'rapids_logger'"},{"fix":"Understand that `rapids-logger` primarily serves as an internal dependency for other RAPIDS Python libraries. Configure logging via the specific RAPIDS library's API or environment variables, rather than trying to directly instantiate a logger from the `rapids_logger` module in Python. Refer to the documentation of the specific RAPIDS library you are using for its logging configuration options.","cause":"Attempting to use `rapids_logger` as a direct logging function or to instantiate a logger directly, which is not its exposed Python API.","error":"TypeError: 'module' object is not callable (when trying to call rapids_logger directly as a logging function)"}],"ecosystem":"pypi"}