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

node logger_name should be assigned after rmw_create_node. #985

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions rcl/src/rcl/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,6 @@ rcl_node_init(
node->impl->fq_name = rcutils_format_string(*allocator, "%s/%s", local_namespace_, name);
}

// node logger name
node->impl->logger_name = rcl_create_node_logger_name(name, local_namespace_, allocator);
RCL_CHECK_FOR_NULL_WITH_MSG(
node->impl->logger_name, "creating logger name failed", goto fail);

RCUTILS_LOG_DEBUG_NAMED(
ROS_PACKAGE_NAME, "Using domain ID of '%zu'", context->impl->rmw_context.actual_domain_id);

Expand Down Expand Up @@ -284,6 +279,12 @@ rcl_node_init(
// error message already set
goto fail;
}

// node logger name
node->impl->logger_name = rcl_create_node_logger_name(name, local_namespace_, allocator);
RCL_CHECK_FOR_NULL_WITH_MSG(
node->impl->logger_name, "creating logger name failed", goto fail);

// The initialization for the rosout publisher requires the node to be in initialized to a point
// that it can create new topic publishers
if (rcl_logging_rosout_enabled() && node->impl->options.enable_rosout) {
Expand Down