Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ros logging #508

Closed
Closed

Conversation

joshua-glazer
Copy link

@joshua-glazer joshua-glazer commented Jan 10, 2022

Public API Changes

Implements Javascript logging functionality similar to ROS logging functions logwarn, logerr, etc.

Description

Created a JS file implementing functions which log to the console and publish to rosout based on the ROS logging level. Created an example file to demonstrate how the functions are used.

Resolves #352

@MatthijsBurgh
Copy link
Contributor

The logging is all in an example. Would be best to make this part of the library IMO.

k-aguete pushed a commit to k-aguete/roslibjs that referenced this pull request Oct 21, 2022
Bumps [rollup](https://github.com/rollup/rollup) from 2.67.3 to 2.68.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v2.67.3...v2.68.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@MatthijsBurgh
Copy link
Contributor

@sea-bass @EzraBrooks What do you think of this PR?

@sea-bass
Copy link
Contributor

sea-bass commented Nov 16, 2023

@sea-bass @EzraBrooks What do you think of this PR?

I would probably prefer to have this be part of the protocol and have the Python backend do actual logging calls through rclpy.

I say this because publishing to /rosout is a limited subset of logging that notably does not make it into console or log file -- see, e.g., https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Logging.html#overview

@EzraBrooks
Copy link
Contributor

EzraBrooks commented Nov 16, 2023

Agreed. I think the "most correct" way to implement this with my knowledge of ROS logging would be to create a protocol-level API in rosbridge + roslib that allows creating namespaced child loggers in the Python backend and then forwarding log content to those from a roslibjs log call. There are some issues with that approach, as we've seen in moveit2, but we're working on fixing them in ROS itself.

@MatthijsBurgh
Copy link
Contributor

I agree with the vision of @sea-bass @EzraBrooks therefore I am closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

roslibjs logging functions missing?
4 participants