Skip to content

InitOptions::auto_initialize_logging(true) does not work with assignment operator. #1258

Closed

Description

@fujitatomoya

Bug report

  • Operating System:
    • Ubuntu20.04
  • Installation type:
    • source build
  • Version or commit hash:
  • DDS implementation:
    • N.A
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

  • build the following test.
int main(int argc, char * argv[])
{
  rclcpp::init(argc, argv);
  auto options = rclcpp::InitOptions().auto_initialize_logging(false);
  if (options.auto_initialize_logging()) {
    std::cout << "options.auto_initialize_logging() is true\n";
    return EXIT_FAILURE;
  } else {
    std::cout << "options.auto_initialize_logging() is false\n";
    return EXIT_SUCCESS;
  }
}
  • run application
# ros2 run ros2_test_prover tmp
options.auto_initialize_logging() is true

Expected behavior

# ros2 run ros2_test_prover tmp
options.auto_initialize_logging() is false

Actual behavior

# ros2 run ros2_test_prover tmp
options.auto_initialize_logging() is true

Additional information

initialize_logging_ should be copied via constructor and assignment operator =. also it would be better to add test.

Activity

  1. fujitatomoya commented on Aug 4, 2020

    @fujitatomoya
    CollaboratorAuthor

    i will be working on this after #1165.

  2. added
    bug
    on Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions