From 3b7017498073d3865ef0d7ceeebdde288ed755cf Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Fri, 11 Mar 2016 21:16:26 +0100 Subject: [PATCH] manual: (fixes #1286) NS_LOG clarification --- doc/manual/source/logging.rst | 5 +++++ 1 file changed, 5 insertions(+) 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'.