Skip to content

Commit

Permalink
Remove log-level argument from spawner script (ros-controls#1013)
Browse files Browse the repository at this point in the history
Use standard ros-args instead
  • Loading branch information
bijoua29 authored May 9, 2023
1 parent cb92c50 commit e3f38cc
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions controller_manager/controller_manager/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,6 @@ def main(args=None):
default=10,
type=int,
)
parser.add_argument(
"--log-level",
help="Log level for spawner node",
required=False,
choices=["debug", "info", "warn", "error", "fatal"],
default="info",
)

command_line_args = rclpy.utilities.remove_ros_args(args=sys.argv)[1:]
args = parser.parse_args(command_line_args)
Expand All @@ -200,15 +193,6 @@ def main(args=None):
param_file = args.param_file
controller_type = args.controller_type
controller_manager_timeout = args.controller_manager_timeout
log_level = args.log_level

loglevel_to_severity = {
"debug": rclpy.logging.LoggingSeverity.DEBUG,
"info": rclpy.logging.LoggingSeverity.INFO,
"warn": rclpy.logging.LoggingSeverity.WARN,
"error": rclpy.logging.LoggingSeverity.ERROR,
"fatal": rclpy.logging.LoggingSeverity.FATAL,
}

if param_file and not os.path.isfile(param_file):
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), param_file)
Expand All @@ -218,7 +202,6 @@ def main(args=None):
prefixed_controller_name = controller_namespace + "/" + controller_name

node = Node("spawner_" + controller_name)
rclpy.logging.set_logger_level("spawner_" + controller_name, loglevel_to_severity[log_level])

if not controller_manager_name.startswith("/"):
spawner_namespace = node.get_namespace()
Expand Down

0 comments on commit e3f38cc

Please sign in to comment.