Skip to content

Commit

Permalink
iox-eclipse-iceoryx#408 use LogWarn and minor corrections
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Killat <matthias.killat@apex.ai>
  • Loading branch information
MatthiasKillat authored and marthtz committed May 12, 2021
1 parent acbf936 commit f57a860
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion iceoryx_binding_c/include/iceoryx_binding_c/publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ typedef struct
/// in the future.
void iox_pub_options_init(iox_pub_options_t* options);

/// @brief check whether the publisher options were initialized by iox_bub_options_init
/// @brief check whether the publisher options were initialized by iox_pub_options_init
/// @param[in] options pointer to options to be checked
/// @return true if options are not null and were initialized, false otherwise
bool iox_pub_options_is_initialized(const iox_pub_options_t* const options);
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_binding_c/source/c_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void iox_pub_options_init(iox_pub_options_t* options)
{
if (options == nullptr)
{
std::cerr << "Warning: publisher options initialization skipped - null pointer provided" << std::endl;
LogWarn() << "publisher options initialization skipped - null pointer provided";
return;
}

Expand Down Expand Up @@ -72,7 +72,7 @@ iox_pub_t iox_pub_init(iox_pub_storage_t* self,
{
if (!iox_pub_options_is_initialized(options))
{
std::cerr << "Warning: publisher options may not have been initialized with iox_pub_init" << std::endl;
LogWarn() << "publisher options may not have been initialized with iox_pub_init";
}
publisherOptions.historyCapacity = options->historyCapacity;
if (options->nodeName != nullptr)
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_binding_c/source/c_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void iox_sub_options_init(iox_sub_options_t* options)
{
if (options == nullptr)
{
std::cerr << "subscriber options initialization skipped - null pointer provided" << std::endl;
LogWarn() << "subscriber options initialization skipped - null pointer provided";
return;
}

Expand Down Expand Up @@ -78,7 +78,7 @@ iox_sub_t iox_sub_init(iox_sub_storage_t* self,
{
if (!iox_sub_options_is_initialized(options))
{
std::cerr << "Warning: subscriber options may not have been initialized with iox_sub_init" << std::endl;
LogWarn() << "subscriber options may not have been initialized with iox_sub_init";
}
subscriberOptions.queueCapacity = options->queueCapacity;
subscriberOptions.historyRequest = options->historyRequest;
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_binding_c/test/moduletests/test_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ TEST(iox_sub_options_test, subscriberOptionsAreInitializedCorrectly)
iox_sub_options_t sut;
sut.queueCapacity = 37;
sut.historyRequest = 73;
sut.nodeName = "DrGonzo";
sut.nodeName = "Dr.Gonzo";

SubscriberOptions options;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2020 by Robert Bosch GmbH, Apex.AI Inc. All rights reserved.
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
// Copyright (c) 2020 - 2021 by Apex.AI Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved.
// Copyright (c) 2020 by Robert Bosch GmbH, Apex.AI Inc. All rights reserved.
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down

0 comments on commit f57a860

Please sign in to comment.