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

Enable setting log levels in DDS implementation #124

Merged
merged 9 commits into from
Jan 18, 2018
14 changes: 14 additions & 0 deletions rmw/include/rmw/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ extern "C"
#include <stdint.h>

#include "rmw/visibility_control.h"
// map rcutils specific log levels to rmw speicfic type
#include <rcutils/logging.h>

typedef int rmw_ret_t;
#define RMW_RET_OK 0
Expand Down Expand Up @@ -229,6 +231,18 @@ typedef struct RMW_PUBLIC_TYPE rmw_message_info_t

enum {RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT = 0};

// Creating a map of rcutil log level types to
// rmw specific types. Check with dds available types
// before using these.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the DDS reference from the comment since the rmw interface doesn't require it to be implemented by DDS.

enum RMW_PUBLIC_TYPE rmw_log_level_t
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use consistent terms: severity instead of level.

{
RMW_LOG_SEVERITY_DEBUG = RCUTILS_LOG_SEVERITY_DEBUG,
RMW_LOG_SEVERITY_INFO = RCUTILS_LOG_SEVERITY_INFO,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the double space to align the equal sign.

Same next line.

RMW_LOG_SEVERITY_WARN = RCUTILS_LOG_SEVERITY_WARN,
RMW_LOG_SEVERITY_ERROR = RCUTILS_LOG_SEVERITY_ERROR,
RMW_LOG_SEVERITY_FATAL = RCUTILS_LOG_SEVERITY_FATAL
};

#if __cplusplus
}
#endif
Expand Down