Skip to content

Commit

Permalink
iox-#1755 Fix typos and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Oct 4, 2023
1 parent 545cacc commit 2a5da9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/design/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ by the `BaseLogger` template parameter and the latter by deriving from the logge

#### Logging macro with lazy evaluation

The `IOX_LOG` macro is intended for general use. It has two parameter. The first one
The `IOX_LOG` macro is intended for general use. It has two parameters. The first one
sets the log level and delegates `file`, `line` and `function` to the `IOX_LOG_INTERNAL`
macro. The latter can be used in places like a custom `ASSERT` macro which already
obtained the `file`, `line` and `function` parameter. The second parameter contains
the items to log and multiple items can be logged by by using the '<<' operator.
the items to log and multiple items can be logged by using the '<<' operator.

The buildup of the log message is only done when the condition to log the message
is fulfilled. This is accomplished by a macro with an if-statement.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

/// @brief Log the location of an error.
/// @param location the location of the error
/// @param msg_stream is the log message stream; multiple items can be logged by using the '<<' operator
#define IOX_ERROR_INTERNAL_LOG(location, msg_stream) \
IOX_LOG_INTERNAL(location.file, \
location.line, \
Expand All @@ -34,6 +35,7 @@

/// @brief Log the location of a fatal error.
/// @param location the location of the error
/// @param msg_stream is the log message stream; multiple items can be logged by using the '<<' operator
#define IOX_ERROR_INTERNAL_LOG_FATAL(location, msg_stream) \
IOX_LOG_INTERNAL(location.file, \
location.line, \
Expand All @@ -43,6 +45,7 @@

/// @brief Log a panic invocation.
/// @param location the location of the panic invocation.
/// @param msg_stream is the log message stream; multiple items can be logged by using the '<<' operator
#define IOX_ERROR_INTERNAL_LOG_PANIC(location, msg_stream) IOX_ERROR_INTERNAL_LOG_FATAL(location, msg_stream)

// NOLINTEND(cppcoreguidelines-macro-usage, bugprone-macro-parentheses)
Expand Down

0 comments on commit 2a5da9a

Please sign in to comment.