Integrate Rerun with native loggers

The Rerun SDK implements the native logging interfaces of its supported host languages, allowing you to transparently stream text logs logged with the native APIs into the Rerun Viewer.

The details of how to achieve that vary language by language, see the snippets below.

"""Shows integration of Rerun's `TextLog` with the native logging interface."""

import logging

import rerun as rr

rr.init("rerun_example_text_log_integration", spawn=True)

# Log a text entry directly
rr.log("logs", rr.TextLog("this entry has loglevel TRACE", level=rr.TextLogLevel.TRACE))

# Or log via a logging handler
logging.getLogger().setLevel(-1)"This INFO log got added through the standard logging interface")