Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove failure check of RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED #257

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/format_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rcutils_format_string_limit(
return NULL;
}
RCUTILS_CHECK_ALLOCATOR(&allocator, return NULL);
// extract the variadic arguments twice, once for length calculatio and once for formatting.
// extract the variadic arguments twice, once for length calculation and once for formatting.
va_list args1;
va_start(args1, format_string);
va_list args2;
Expand Down
18 changes: 6 additions & 12 deletions src/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,12 @@ rcutils_ret_t rcutils_logging_initialize_with_allocator(rcutils_allocator_t allo

const char * line_buffered = NULL;
const char * ret_str = rcutils_get_env("RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED", &line_buffered);
if (NULL == ret_str) {
if (strcmp(line_buffered, "") != 0) {
fprintf(
stderr,
"RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED is now ignored. "
"Please set RCUTILS_LOGGING_USE_STDOUT and RCUTILS_LOGGING_BUFFERED_STREAM "
"to control the stream and the buffering of log messages.\n");
}
} else {
RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(
"Error getting environment variable RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED: %s", ret_str);
return RCUTILS_RET_ERROR;
if (NULL == ret_str && strcmp(line_buffered, "") != 0) {
fprintf(
stderr,
"RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED is now ignored. "
"Please set RCUTILS_LOGGING_USE_STDOUT and RCUTILS_LOGGING_BUFFERED_STREAM "
"to control the stream and the buffering of log messages.\n");
}

// Set the default output stream for all severities to stderr so that errors
Expand Down