From c35564bef84a6b571b99573279d6e3d2f3c18ec8 Mon Sep 17 00:00:00 2001 From: Tully Foote Date: Wed, 1 Apr 2020 17:18:32 -0700 Subject: [PATCH 1/2] Add documentation of log levels Signed-off-by: Tully Foote --- rcl_interfaces/msg/Log.msg | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rcl_interfaces/msg/Log.msg b/rcl_interfaces/msg/Log.msg index 514e3707..863933b7 100644 --- a/rcl_interfaces/msg/Log.msg +++ b/rcl_interfaces/msg/Log.msg @@ -1,5 +1,13 @@ ## ## Severity level constants +## +## These logging levels follow the Python Standard +## https://docs.python.org/3/library/logging.html#logging-levels +## And are implemented in rcutils as well +## https://github.com/ros2/rcutils/blob/35f29850064e0c33a4063cbc947ebbfeada11dba/include/rcutils/logging.h#L164-L172 +## This leaves space for other logging levels to be inserted in the middle in the future. +## Since there are several other logging enumeration standard for different implementations. +## Other logging implementations may need to provide level translations to match their internal implementations. ## byte DEBUG=10 #debug level byte INFO=20 #general level From fe46acf40fdf23c0f29d51339e3965c7b8ca9771 Mon Sep 17 00:00:00 2001 From: Tully Foote Date: Fri, 15 May 2020 01:49:02 -0700 Subject: [PATCH 2/2] rephrased based on review feedback Signed-off-by: Tully Foote --- rcl_interfaces/msg/Log.msg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rcl_interfaces/msg/Log.msg b/rcl_interfaces/msg/Log.msg index 863933b7..7afa45eb 100644 --- a/rcl_interfaces/msg/Log.msg +++ b/rcl_interfaces/msg/Log.msg @@ -5,9 +5,10 @@ ## https://docs.python.org/3/library/logging.html#logging-levels ## And are implemented in rcutils as well ## https://github.com/ros2/rcutils/blob/35f29850064e0c33a4063cbc947ebbfeada11dba/include/rcutils/logging.h#L164-L172 -## This leaves space for other logging levels to be inserted in the middle in the future. -## Since there are several other logging enumeration standard for different implementations. -## Other logging implementations may need to provide level translations to match their internal implementations. +## This leaves space for other standard logging levels to be inserted in the middle in the future, +## as well as custom user defined levels. +## Since there are several other logging enumeration standard for different implementations, +## other logging implementations may need to provide level mappings to match their internal implementations. ## byte DEBUG=10 #debug level byte INFO=20 #general level