Skip to main content

About

The rapids-logger project defines an easy way to produce a project-specific logger using the excellent spdlog package. This project has two primary goals:

  1. Ensure that projects wishing to provide their own logger may do so easily without needing to reimplement their own custom wrappers around spdlog.
  2. Ensure that custom logger implementations based on spdlog do not leak any spdlog (or fmt) symbols, allowing the safe coexistence of different projects in the same environment even if they use different versions of spdlog.

Note: There is an unrelated CI tool of the same name which is part of the gha-tools repository.

rapids-logger is designed to be used via CMake. Its CMakeLists.txt defines a function rapids_make_logger that can be used to produce a project-specific logger class in a provided namespace. The resulting logger exposes spdlog-like functionality via the PImpl idiom to avoid exposing spdlog symbols publicly. It uses CMake and template C++ files to generate a public header file to describe the user interface and an inline header that should be placed in a single TU by consumers to compile the implementation. To simplify usage, each invocation of the function produces two CMake targets, one representing the public header and one representing a trivial source file including the inline header. Projects using rapids-logger should make the first target part of their public link interface while the latter should be linked to privately so that it is compiled into the project's library without public exposure.

Logging levels are controlled both at compile-time and at runtime. To mirror spdlog, each generated logger ships with a set of logging macros <project-name>_LOG_<log-level>. These macros are compiled based on the value of the compile-time variable <project-name>_LOG_ACTIVE_LEVEL. For example, a project called "RAPIDS" will be able to write code like this:

RAPIDS_LOG_DEBUG("Some message to be shown when the debug level is enabled");

and control whether that message is shown by compiling the code with RAPIDS_LOG_ACTIVE_LEVEL=RAPIDS_LOG_LEVEL_DEBUG. Additionally, the default runtime logging level can be controlled at compile time through the LOGGER_DEFAULT_LEVEL argument of rapids_make_logger. This default runtime value allows for compiling with INFO level messages available, but only showing WARN or higher at runtime by default. Users can then opt in to more verbose logging at runtime using default_logger().set_level(...).

Each project is endowed with its own definition of levels, so different projects in the same environment may be safely configured independently of each other and of spdlog. Each project is also given a default_logger function that produces a global logger that may be used anywhere, but projects may also freely instantiate additional loggers as needed.

Making Releases

Making major or minor releases

To make a release of rapids-logger, follow these steps:

  1. Create a new branch off of main named release/vX.Y where X.Y is the new version number. This branch must be on the main rapidsai/rapids-logger repo, not a fork.
  2. Create and merge a PR to the new branch updating the three-part version number in VERSION. Its contents should be X.Y.Z. Note that we do not create a separate branch for each patch version since patch releases are made directly on top of a preexisting release branch (whereas a minor release might need to maintain a long-running branch for future patch releases).
  3. Make any other commits necessary for the release on this branch.
  4. Open a PR from release/vX.Y to main and get it reviewed and merged.
  5. Tag this new commit on main with vX.{Y+1}a. This alpha tag now sets the starting point of the next release.
  6. Create a new tag vX.Y on the HEAD of release/vX.Y to mark the release.
  7. Push both tags with git push --tags.

Making patch Releases

To make a patch release of rapids-logger, follow these steps:

  1. Create PRs to the appropriate release branch release/vX.Y where X.Y is the version number of the release branch containing any fixes needed for the patch release. Get these PRs reviewed and merged.
  2. Create and merge a PR to update the patch version in VERSION to X.Y.Z where Z is the new patch version.
  3. Tag the HEAD of the release branch with vX.Y.Z to mark the release.
  4. Push the new tag with git push --tags.

Metadata

Release files for rapids-logger 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for rapids-logger 0.3.0
File Interpreter ABI Platform
rapids_logger-0.3.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
rapids_logger-0.3.0-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details

Total release size: 528.0 kB

Release files / rapids_logger-0.3.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL rapids_logger-0.3.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 274.3 kB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9d9094dd241c4e0f2d0c3bad448871e62f9b915e1ef65db41b0a1cf4473b1066
BLAKE2b-256 checksum
How to use checksums
683a78f6245eefe6654b7ec2c8e92f168ee63ec4cfb69c10c4ca71dbeffd9aff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / rapids_logger-0.3.0-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL rapids_logger-0.3.0-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 253.7 kB
Tags Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
6ca9359d6187934f93e0bbadaa1bd5af72e567e536d41227192d39967125ef32
BLAKE2b-256 checksum
How to use checksums
68a22761d3ba39b18151f4e0b2d4e3480856c69ab1b439d8e530512ad618e6c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.19

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page