diff --git a/doc/manual/source/logging.rst b/doc/manual/source/logging.rst index 7c00e5024..4224ef507 100644 --- a/doc/manual/source/logging.rst +++ b/doc/manual/source/logging.rst @@ -424,6 +424,11 @@ Guidelines Run some example programs with all log components turned on (e.g. ``NS_LOG="***"``). +* Use an explicit cast for any variable of type uint8_t or int8_t, + e.g., ``NS_LOG_LOGIC ("Variable i is " << static_cast (i));``. + Without the cast, the integer is interpreted as a char, and the result + will be most likely not in line with the expectations. + This is a well documented C++ 'feature'.