Skip to content

Fix renderer backend INFO logs silenced on kitless backends - #6813

Merged
kellyguo11 merged 2 commits into
isaac-sim:developfrom
mataylor-nvidia:mataylor/fix-kitless-renderer-logging
Aug 5, 2026
Merged

Fix renderer backend INFO logs silenced on kitless backends#6813
kellyguo11 merged 2 commits into
isaac-sim:developfrom
mataylor-nvidia:mataylor/fix-kitless-renderer-logging

Conversation

@mataylor-nvidia

@mataylor-nvidia mataylor-nvidia commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • The two startup log lines `[INFO]: Created new renderer for simulation: ` and `[INFO]: Using renderer: ` were silenced on kitless backends (Newton, OvPhysX) because the root logger defaults to `WARNING` and no Kit logging bridge is present
  • Add `force_log_level(level)` context manager to `logging_utils` that saves the root logger and handler levels, lowers them for the duration of the block, then restores them — no permanent change to any logger or handler
  • Wrap the two `logger.info()` call sites in `RenderContext` and `Camera` with `force_log_level(logging.INFO)` so the messages always reach the console regardless of backend

Test plan

  • Run with a kitless backend (e.g. `physics=newton_mjwarp`) and confirm `[INFO]: Created new renderer for simulation: OVRTXRenderer` and `[INFO]: Using renderer: OVRTXRenderer` appear in stdout
  • Run with a Kit-based backend (default) and confirm the same lines still appear and no other INFO output is added
  • Run with `--verbose` / `--info` and confirm no duplicate or missing log lines

@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review. (3000 files found, 100 file limit)

@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Jul 30, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

The shared isaaclab_info_stream handler extraction preserves the Kit path and enables INFO output for kitless Newton/OvPhysX runs. However, the kitless root-level adjustment unintentionally overrides explicitly stricter logging levels such as ERROR or CRITICAL.

  • Design and architecture: Centralizing the idempotent handler installer in logging_utils and retaining AppLauncher._ensure_isaaclab_info_stream_handler as a delegator is a sound way to share logging behavior across Kit and kitless launch paths.
  • API: The existing AppLauncher static method remains available, while the new helper is documented consistently with the neighboring logging utilities. The patch-tier changelog fragment follows the required format.
  • Implementation: The extracted handler retains the existing filter, formatter, and name-based idempotence. In the kitless path, however, level >= logging.WARNING also matches ERROR and CRITICAL, so the subsequent root logger change to INFO defeats a caller's stricter configured level. Limit this adjustment to the intended default WARNING case or scope the INFO level to the isaaclab logger.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

Comment thread source/isaaclab/isaaclab/app/sim_launcher.py Outdated
@mataylor-nvidia

Copy link
Copy Markdown
Author

This shows how logging has changed:

Run 1 — generic renderer=rtx preset

Logs: rtx_preset/

./isaaclab.sh train --rl_library skrl --task Isaac-Cartpole-Camera-Direct renderer=rtx physics=newton_mjwarp
./isaaclab.sh train --rl_library skrl --task Isaac-Cartpole-Camera-Direct renderer=rtx physics=ovphysx
./isaaclab.sh train --rl_library skrl --task Isaac-Cartpole-Camera-Direct renderer=rtx --viz=kit
Log file Command Created new renderer Using renderer
cmd1_rtx_newton_mjwarp.log renderer=rtx physics=newton_mjwarp OVRTXRenderer OVRTXRenderer
cmd2_rtx_ovphysx.log renderer=rtx physics=ovphysx OVRTXRenderer OVRTXRenderer
cmd3_rtx_viz_kit.log renderer=rtx --viz=kit IsaacRtxRenderer IsaacRtxRenderer

Key log lines

cmd1 (renderer=rtx physics=newton_mjwarp — OVRTX kitless + Newton MJWarp):

[INFO]: Created new renderer for simulation: OVRTXRenderer
[INFO]: Using renderer: OVRTXRenderer

cmd2 (renderer=rtx physics=ovphysx — OVRTX kitless + OVPhysX):

[INFO]: Created new renderer for simulation: OVRTXRenderer
[INFO]: Using renderer: OVRTXRenderer

cmd3 (renderer=rtx --viz=kit — Isaac Sim Kit path):

[INFO]: Created new renderer for simulation: IsaacRtxRenderer
[INFO]: Using renderer: IsaacRtxRenderer

rtx_preset.zip

@mataylor-nvidia

Copy link
Copy Markdown
Author

@ndahile-nvidia for review

Comment thread source/isaaclab/isaaclab/app/sim_launcher.py Outdated

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-generated review

Requesting changes.

The review bot's >= logging.WARNING finding is correct, and Kelly's process-wide logging concern is reproducible. With the sequence in this PR, a first default kitless launch resolves WARNING but leaves the root logger at INFO; a second launch then resolves that internally modified INFO level, lowers pre-existing root handlers to INFO, and allows unrelated third-party INFO records through. Explicit ERROR and CRITICAL levels are also reset to INFO. Please keep the INFO enablement scoped to the isaaclab logger namespace and preserve the caller's root level.

The inline comments cover the minimal regression coverage, exact namespace matching, unnecessary API/indirection, and duplicated changelog rationale.

Verification: source/isaaclab_tasks/test/core/test_sim_launcher_visualizer_intent.py passed (3 tests), but its current logging test does not exercise this behavior. ./isaaclab.sh -f passed all hooks. The PR currently conflicts with develop and will also need a rebase.

Comment thread source/isaaclab/isaaclab/app/sim_launcher.py Outdated
Comment thread source/isaaclab/isaaclab/app/logging_utils.py Outdated
Comment thread source/isaaclab/isaaclab/app/app_launcher.py Outdated
Comment thread source/isaaclab/isaaclab/app/logging_utils.py Outdated
Comment thread source/isaaclab/changelog.d/mataylor-fix-kitless-renderer-logging.rst Outdated
@AntoineRichard

Copy link
Copy Markdown
Collaborator

AI-generated implementation suggestion

I recommend centralizing the complete logging policy in one private helper. The root logger should remain at the resolved level, while the isaaclab namespace is raised to INFO only for the default WARNING case.

In logging_utils.py:

_ISAACLAB_INFO_HANDLER_NAME = "isaaclab_info_stream"


def _ensure_isaaclab_info_stream_handler() -> None:
    """Install the scoped Isaac Lab INFO handler if needed."""
    root_logger = logging.getLogger()

    for handler in root_logger.handlers:
        if handler.name == _ISAACLAB_INFO_HANDLER_NAME:
            # apply_python_logging_level() may have changed this.
            handler.setLevel(logging.INFO)
            return

    class _IsaacLabInfoFilter(logging.Filter):
        def filter(self, record: logging.LogRecord) -> bool:
            is_isaaclab_logger = record.name == "isaaclab" or record.name.startswith("isaaclab.")
            return record.levelno == logging.INFO and is_isaaclab_logger

    handler = logging.StreamHandler(sys.stdout)
    handler.name = _ISAACLAB_INFO_HANDLER_NAME
    handler.setLevel(logging.INFO)
    handler.addFilter(_IsaacLabInfoFilter())
    handler.setFormatter(logging.Formatter("[INFO]: %(message)s"))
    root_logger.addHandler(handler)


def _configure_python_logging(level: int) -> None:
    """Configure Python logging with default INFO output scoped to Isaac Lab."""
    apply_python_logging_level(level)

    isaaclab_logger = logging.getLogger("isaaclab")
    isaaclab_logger.setLevel(logging.INFO if level == logging.WARNING else level)

    if level <= logging.WARNING:
        _ensure_isaaclab_info_stream_handler()

Then both launch paths can use the same policy.

In AppLauncher._load_extensions():

_configure_python_logging(self._python_logging_level)

In launch_simulation():

if not needs_kit:
    level = resolve_python_logging_level(launcher_args)
    _configure_python_logging(level)

This removes the process-wide logging.getLogger().setLevel(logging.INFO) override, the level >= logging.WARNING branch, the AppLauncher delegating wrapper, and the duplicated configuration sequence.

A focused standard-library test should verify:

  • Default configuration emits isaaclab.* INFO records but not Kit or third-party INFO records.
  • Two consecutive configurations install only one handler and behave identically.
  • ERROR and CRITICAL remain unchanged.
  • A logger such as isaaclab_plugin does not pass the namespace filter.

No simulator integration test is needed. Per the regression-test policy, temporarily restoring the old root-level override should make the new test fail.

The two startup messages
  [INFO]: Created new renderer for simulation: <name>
  [INFO]: Using renderer: <name>
were silenced on Newton / OvPhysX backends because the root logger and
its handlers default to WARNING and no Kit logging bridge is present to
surface them.

Instead of permanently altering any logger or handler level, add a
force_log_level(level) context manager to logging_utils that saves the
root logger and handler levels, lowers them for the duration of the
with-block, then restores them.  The two call sites in RenderContext
and Camera wrap their logger.info() calls with this shim so the messages
always reach the console without affecting any other log output.
@mataylor-nvidia
mataylor-nvidia force-pushed the mataylor/fix-kitless-renderer-logging branch from a44a6c7 to 75a682c Compare August 4, 2026 22:31
@mataylor-nvidia mataylor-nvidia changed the title Fix isaaclab.* INFO logs silenced on kitless backends Fix isaaclab.* INFO logs silenced on kitless backends for renderer backends Aug 4, 2026
@mataylor-nvidia mataylor-nvidia changed the title Fix isaaclab.* INFO logs silenced on kitless backends for renderer backends Fix renderer backend INFO logs silenced on kitless backends Aug 4, 2026
@mataylor-nvidia
mataylor-nvidia dismissed AntoineRichard’s stale review August 4, 2026 23:42

This comment was made on previous temp fix.

@kellyguo11
kellyguo11 merged commit 5a76ce5 into isaac-sim:develop Aug 5, 2026
66 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants