Fix Kit Python info logging#5803
Conversation
Preserve the intended Python logging level across Kit startup and add an Isaac Lab-scoped INFO stream handler for records hidden by Kit's logging bridge. This keeps joint wrench sensor initialization logs visible in Kit-backed PhysX launches without changing the sensor implementation.
Greptile SummaryThis PR fixes Isaac Lab
Confidence Score: 3/5The default (no-flag) path is correct and tested; the --info/--verbose path may produce duplicate log output depending on Kit's carb routing, and was not covered by the test plan. The fix restores the missing joint-wrench initialization log and the WARNING-mode logic is sound. However, the branch that fires when the user explicitly passes --info or --verbose installs the scoped stdout handler at the same time as Kit's bridge is set to INFO/DEBUG — if carb directs its output to the same console, every isaaclab INFO line will appear twice. This code path was not mentioned in the test plan, so the potential duplicate-output regression is unverified. source/isaaclab/isaaclab/app/app_launcher.py — the verbose/info branch of _load_extensions needs a second look Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[AppLauncher.__init__ called] --> B[_resolve_python_logging_level\nsnapshot level before Kit]
B --> C[SimulationApp starts\nKit installs Python log bridge at DEBUG]
C --> D[_load_extensions called]
D --> E[_apply_python_logging_level\nset root + all handlers to resolved level]
E --> F{resolved level?}
F -- "≤ INFO\n(--info / --verbose)" --> G[_ensure_isaaclab_info_stream_handler\nadd scoped stdout handler]
F -- "== WARNING\n(default)" --> H[_ensure_isaaclab_info_stream_handler\nadd scoped stdout handler]
H --> I[root logger setLevel INFO\nso scoped handler receives INFO records]
F -- "> WARNING\n(ERROR / CRITICAL)" --> J[No scoped handler added\nisaaclab INFO hidden]
G --> K{carb output in same terminal?}
K -- Yes --> L[Duplicate isaaclab INFO lines\ncarb via bridge + scoped stdout]
K -- No --> M[isaaclab INFO visible in terminal only]
I --> N[Kit bridge handlers at WARNING\nfilter non-isaaclab INFO\nScoped handler passes isaaclab INFO to stdout]
Reviews (1): Last reviewed commit: "Fix Kit Python info logging" | Re-trigger Greptile |
| if self._python_logging_level <= logging.INFO: | ||
| AppLauncher._ensure_isaaclab_info_stream_handler() |
There was a problem hiding this comment.
Duplicate isaaclab INFO output when
--info or --verbose is passed
When _python_logging_level <= logging.INFO, _apply_python_logging_level sets Kit's bridge handlers to INFO/DEBUG, so they will forward isaaclab INFO records to carb. Simultaneously, _ensure_isaaclab_info_stream_handler installs an additional stdout handler for those same records. In environments where carb's output surfaces in the same terminal as Python's stdout (the common headless console case), every isaaclab INFO line will print twice — once via carb's routing from Kit's bridge, once via the dedicated [INFO]: … stream handler. The stated test plan only exercises the default (no-flag) path, leaving this path unverified.
| AppLauncher._apply_python_logging_level(self._python_logging_level) | ||
| if self._python_logging_level <= logging.INFO: | ||
| AppLauncher._ensure_isaaclab_info_stream_handler() | ||
| elif self._python_logging_level == logging.WARNING: | ||
| AppLauncher._ensure_isaaclab_info_stream_handler() | ||
| # Let Isaac Lab INFO records reach the scoped handler while the other root | ||
| # handlers remain at WARNING. | ||
| logging.getLogger().setLevel(logging.INFO) |
There was a problem hiding this comment.
Root logger level set to WARNING then immediately overridden to INFO
_apply_python_logging_level(WARNING) sets the root logger to WARNING, but the very next statement in this branch unconditionally sets it back to INFO. The root-level assignment inside _apply_python_logging_level has no lasting effect here — only the per-handler assignments matter. Consider documenting clearly why the root must end up at INFO even when the user-facing level is WARNING.
| AppLauncher._apply_python_logging_level(self._python_logging_level) | |
| if self._python_logging_level <= logging.INFO: | |
| AppLauncher._ensure_isaaclab_info_stream_handler() | |
| elif self._python_logging_level == logging.WARNING: | |
| AppLauncher._ensure_isaaclab_info_stream_handler() | |
| # Let Isaac Lab INFO records reach the scoped handler while the other root | |
| # handlers remain at WARNING. | |
| logging.getLogger().setLevel(logging.INFO) | |
| AppLauncher._apply_python_logging_level(self._python_logging_level) | |
| if self._python_logging_level <= logging.INFO: | |
| AppLauncher._ensure_isaaclab_info_stream_handler() | |
| elif self._python_logging_level == logging.WARNING: | |
| AppLauncher._ensure_isaaclab_info_stream_handler() | |
| # _apply_python_logging_level set all handlers to WARNING; lower only the root | |
| # logger to INFO so that isaaclab INFO records can reach the scoped handler | |
| # while every other handler still filters them out. | |
| logging.getLogger().setLevel(logging.INFO) | |
| # Note: the root.setLevel(WARNING) inside _apply_python_logging_level is | |
| # intentionally overridden here — only handler-level filtering is needed. |
… locomanip quaternion, deformable demo, IK, benchmark scripts (#5816) # Description Cherry pick following PRs from develop: - #5779 - #5760 - #5791 - #5810 - #5811 - #5812 - #5754 - #5802 - #5803 - #5782 - #5804 - #5744 - #5775 - #5784 --------- Signed-off-by: Kelly Guo <kellyg@nvidia.com> Co-authored-by: John <jaybdub@users.noreply.github.com> Co-authored-by: myurasov-nv <168484206+myurasov-nv@users.noreply.github.com> Co-authored-by: Antoine RICHARD <antoiner@nvidia.com> Co-authored-by: Mike Yan Michelis <46975745+mmichelis@users.noreply.github.com> Co-authored-by: hujc <jichuanh@nvidia.com>
Description
Fixes the Kit-backed Python logging path so Isaac Lab
INFOrecords remain visible afterSimulationAppinstalls Kit's logging bridge. This restores the PhysX joint wrench sensor initialization log forIsaac-Ant-v0withpresets=physxwhile keeping the sensor implementations on standard Python logging.Fixes the reported joint wrench sensor logging issue.
Type of change
Screenshots
N/A
Test Plan
./isaaclab.sh -fgit diff --checktimeout 120s ./isaaclab.sh -p scripts/environments/zero_agent.py --task Isaac-Ant-v0 --num_envs 1 --viz newton presets=physx[INFO]: Joint wrench sensor initialized: 1 envs, 9 bodies./isaaclab.sh -p -m pytest source/isaaclab_physx/test/sensors/test_joint_wrench_sensor.py::test_initialization_and_shapesChecklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bumpextension.toml— CI handles that)CONTRIBUTORS.mdor my name already exists there