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

Make logging more universal #81

Open
YuriVanWarmerdam opened this issue Feb 3, 2025 · 0 comments
Open

Make logging more universal #81

YuriVanWarmerdam opened this issue Feb 3, 2025 · 0 comments

Comments

@YuriVanWarmerdam
Copy link
Collaborator

Currently we use:

from rclpy import logging

logger = logging.get_logger(__name__)

But also:

from logging import getLogger

logger = getLogger(__name__)

In addition, sometimes the logger is a class member, and sometimes it is declared at file level.
All of this should be fair ly minor in tems of impact, since I am fairly sure it's all different ways of accessing the same singleton, but it's messy.

I propose we change all of these to to:

from logging import getLogger

logger = getLogger(__name__)

Always do this at file level, never as a class member. Main reason for this is that it reduces the extra "this.logger" syntax.

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

No branches or pull requests

1 participant